Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdbf2e26

Browse files
committed
Prevent passing gmake's environment variables down through pg_regress.
When we do "make install" to create a temp installation, we don't wantthat instance of make to try to communicate with any instance of makethat might be calling us. This is known to cause problems if theupper make has a -jN flag, and in principle could cause problems evenwithout that. Unset the relevant environment variables to prevent suchissues.Andres Freund
1 parent4ef4159 commitdbf2e26

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,19 @@ initialize_environment(void)
786786
doputenv("PGPORT",s);
787787
}
788788

789+
/*
790+
* GNU make stores some flags in the MAKEFLAGS environment variable to
791+
* pass arguments to its own children.If we are invoked by make,
792+
* that causes the make invoked by us to think its part of the make
793+
* task invoking us, and so it tries to communicate with the toplevel
794+
* make. Which fails.
795+
*
796+
* Unset the variable to protect against such problems. We also reset
797+
* MAKELEVEL to be certain the child doesn't notice the make above us.
798+
*/
799+
unsetenv("MAKEFLAGS");
800+
unsetenv("MAKELEVEL");
801+
789802
/*
790803
* Adjust path variables to point into the temp-install tree
791804
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp