[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

make alters subprocess environment

From: Павел Сутырин
Subject: make alters subprocess environment
Date: Wed, 19 Sep 2007 16:36:07 +0400

Hi all! 

Here is what I'm interested in -- make *seems to alter subprocess environment 
somehow (current dir and variables supposedly). Here is the story.

For testing of a Delphi5 application under WindowsXP I've established following 
call chain (on my machine make is renamed to gmake): 

gmake.exe -> testApp.exe -> ..\..\db_comparator\ <some params>

The latter is a separate utility intended to test the equality of some database 
tables during tests, a thing written in python just for the case. 

I've discovered, that CreateProcess() (used in testApp.exe for calls to python 
utility) cannot parse relative paths to executables. Then I've modified chain: 

gmake.exe -> testApp.exe -> db_comparator.bat -> 
..\..\db_comparator\ <some params>

where db_comparator.bat is in the same dir with testApp.exe and obviously 

..\..\ %*

this configuration seemed to work, but ONLY if i run testApp.exe manually. When 
gmake runs it during all the tests -- it fails. Manual rerun (from cmd) of 
db_comparator.bat or ..\..\ with the same parameters is 


gmake.exe -> testApp.exe -> db_comparator.bat -> 
..\..\db_comparator\ <some params> 

testApp.exe -> db_comparator.bat -> ..\..\db_comparator\ <some 

Another issue connected. If I want interrupt a make run by pressing Ctrl-C at 
the cmd terminal, windows reports: "gmake.exe -- error encountered. The 
application will be closed", and when i close this window, at the termnial make 

  gmake: *** [test] Error -1073741510

Moreover, this sequence (an error window and a line at terminal) happens once 
for every nested gmake, that was active at the moment of interruption, so it 
may result in this: 

gmake[3]: *** [testApp.exe] Error -1073741510
gmake[2]: *** [build] Error -1073741819
gmake[1]: *** [test] Error -1073741819
gmake: *** [test] Error -1073741819
These two issues seem to be connected with the way make controls its 
subprocesses. What is known?.. 


  C:\>gmake --version
  GNU Make version 3.75, by Richard Stallman and Roland McGrath.

Thank you for reading all this length, 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]