[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\db_comparator.py <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\db_comparator.py <some params>
where db_comparator.bat is in the same dir with testApp.exe and obviously
contains:
..\..\db_comparator.py %*
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 ..\..\db_comparator.py with the same parameters is
successful.
Summarizing:
gmake.exe -> testApp.exe -> db_comparator.bat ->
..\..\db_comparator\db_comparator.py <some params>
FAILS
testApp.exe -> db_comparator.bat -> ..\..\db_comparator\db_comparator.py <some
params>
WORKS
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
says:
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?..
APPENDIX:
C:\>gmake --version
GNU Make version 3.75, by Richard Stallman and Roland McGrath.
Thank you for reading all this length,
--pavel.
- make alters subprocess environment,
Павел Сутырин <=