Jurko Gospodnetić
d34ffa9d42
Boost Jam code cleanup - refactored code in exec*.c module for executing child processes to reduce duplication and function size. The only externally visible change is in several debug (-d+4) messages.
...
[SVN r79065]
2012-06-24 16:10:58 +00:00
Jurko Gospodnetić
e56812f2f7
Boost Jam code cleanup - extracted code making the actual CreateProcessA() call in the execnt.c module into a separate invoke_cmd() function.
...
[SVN r79063]
2012-06-24 14:57:41 +00:00
Jurko Gospodnetić
7e6b310623
Boost Jam code cleanup - added a new execcmd.c module to hold shared implementation between different exec*.c modules. Extracted external command process interrupt handling code into the new module.
...
BROKEN: execcmd.c not actually added in this revision.
[SVN r79055]
2012-06-24 11:59:49 +00:00
Jurko Gospodnetić
d4b88e9cdb
Boost Jam code cleanup - removed global exec*.c module exec_done() cleanup routines as they were either not doing anything (execnt.c) or just releasing memory that would get released automatically by the OS on the imminent process exit (execunix.c).
...
[SVN r79052]
2012-06-24 10:58:58 +00:00
Jurko Gospodnetić
0bc246eb32
Boost Jam code cleanup - extracted functions for finding a free running tables command slot in execnt.c & execunix.c modules.
...
[SVN r79051]
2012-06-24 10:42:19 +00:00
Jurko Gospodnetić
f62bd6b933
Corrected a Boost Jam bug introduced in revision 79046 - the total running command count was not getting bumped correctly.
...
[SVN r79048]
2012-06-24 10:23:28 +00:00
Jurko Gospodnetić
f86805e8ef
Boost Jam code cleanup - declared a couple of variables as const.
...
[SVN r79047]
2012-06-24 08:41:02 +00:00
Jurko Gospodnetić
8e8a55d779
Boost Jam code cleanup - execnt.c module code for registering its Ctrl-C related interrupt signal handler. Static variables no longer explicitly initialized to 0 since the compiler/loader does this for us.
...
BROKEN - fails to bump the total running command count.
[SVN r79046]
2012-06-24 01:09:18 +00:00
Jurko Gospodnetić
6ae5f2e30d
Boost Jam code cleanup - execnt.c module - minor stylistic changes.
...
[SVN r79045]
2012-06-24 01:02:39 +00:00
Jurko Gospodnetić
3476bbc69e
Boost Jam code cleanup - execnt.c module no longer frees its temporary command file name storage buffer since it reuses the same file name for the next command run from the same running commands table slot anyway and the final command's temporary file name storage buffer will get released on program exit anyway.
...
[SVN r79044]
2012-06-24 00:41:24 +00:00
Jurko Gospodnetić
2a8058aff3
Boost Jam code cleanup - execnt.c module no longer double-frees its running commands table slot's action & target variables when reusing the same slot for multiple commands.
...
[SVN r79043]
2012-06-24 00:18:43 +00:00
Jurko Gospodnetić
49f1b006f8
Updated Boost Jam's execnt.c module to report correct Windows API error messages instead of incorrectly expecting them to set the global errno C library variable and printing out error messages related to this invalid/random/unrelated value.
...
[SVN r79042]
2012-06-24 00:12:41 +00:00
Jurko Gospodnetić
5622bb4a9d
Code cleanup in Boost Jam's execnt.c module.
...
[SVN r79041]
2012-06-24 00:09:46 +00:00
Jurko Gospodnetić
b45ec34c91
Updated the Boost.Jam exec_cmd() interface to take its command parameter as a string object instead of a raw char *.
...
[SVN r79007]
2012-06-19 12:33:49 +00:00
Jurko Gospodnetić
09e976d0cb
Removed a printf() statement in Boost Jam's execnt.c module leftover by accident from a previous debugging session.
...
[SVN r79006]
2012-06-19 12:28:30 +00:00
Jurko Gospodnetić
fd4d69acd6
Cleaned up Boost Jam's exec_cmd() interface a bit to avoid its callback definition duplication. Minor stylistic changes.
...
[SVN r79005]
2012-06-19 12:13:42 +00:00
Jurko Gospodnetić
f658bf410a
Minor stylistic changes - renamed command parameter in string_new_trimmed() in Boost Jam's execnt.c module to source.
...
[SVN r79004]
2012-06-19 12:07:23 +00:00
Jurko Gospodnetić
a9d0cdd8e2
Added explicit checking for too long command-line arguments for running directly using the CreateProcessA() API.
...
[SVN r79000]
2012-06-19 00:55:44 +00:00
Jurko Gospodnetić
2dfef646c3
Refactoring Boost Build's execnt.c module - can_spawn() now takes a string * instead of a char * argument. Minor stylistic changes.
...
[SVN r78999]
2012-06-19 00:51:37 +00:00
Jurko Gospodnetić
5c9c05e42b
Refactored Boost Build's execnt.c module - commands to execute are now trimmed of all their leading and trailing spaces up front instead of 'whenever that becomes needed', removed redundant extra splitting of directly executed command strings into arguments. This fixes a bug caused by this extra splitting removing quotes around the executable (argument 0) - e.g. when executing the program 'C:\Program Files\dummy.exe' this would cause the program 'C:\Program.exe' to be executed instead if it exists.
...
[SVN r78997]
2012-06-19 00:23:18 +00:00
Jurko Gospodnetić
0a2eb316a6
Cleaned up end-user debug messages related to Boost Build's execnt.c module (-d+4).
...
[SVN r78996]
2012-06-19 00:02:25 +00:00
Jurko Gospodnetić
18e5ffe6cc
Minor stylistic changes.
...
[SVN r78995]
2012-06-18 23:56:01 +00:00
Jurko Gospodnetić
9ee9f351d4
Minor stylistic changes.
...
[SVN r78994]
2012-06-18 23:39:12 +00:00
Jurko Gospodnetić
a639ea7188
Minor stylistic end-user error message update in Boost Build's execnt.c module.
...
[SVN r78993]
2012-06-18 23:31:40 +00:00
Jurko Gospodnetić
c63206558f
Added logging the exact command-line string passed to the CreateProcessA() Windows API in Boost Build's execnt.c module.
...
[SVN r78992]
2012-06-18 23:30:58 +00:00
Jurko Gospodnetić
92296ee7a4
Code cleanup in Boost Build's execnt.c module - using the CreateProcessA() API directly instead of the CreateProcess() wrapper now & made some code more localized.
...
[SVN r78991]
2012-06-18 23:28:30 +00:00
Jurko Gospodnetić
3f6421cd91
Checking whether a command can be spawned directly (as opposed to invoking it via an external shell) in Boost Build's execnt.c module now correctly skips all leading whitespace characters and not just tabs and spaces.
...
[SVN r78990]
2012-06-18 23:17:33 +00:00
Jurko Gospodnetić
992931ee90
Refactored the Boost Build execnt.c module's maxline() function to cache its result instead of calling the GetVersionEx() Windows API on every call.
...
[SVN r78989]
2012-06-18 23:12:33 +00:00
Jurko Gospodnetić
e25c77fc7d
Minor stylistic changes - standardized relative type name and const modifier positions in Boost Build's execnt.c C module.
...
[SVN r78988]
2012-06-18 23:08:52 +00:00
Jurko Gospodnetić
8bdc35427c
Minor stylistic changes.
...
[SVN r78987]
2012-06-18 23:02:48 +00:00
Steven Watanabe
60d66ca888
Use dynamic arrays instead of linked lists. Reduces memory use about 10% overall.
...
[SVN r77408]
2012-03-19 18:17:36 +00:00
Steven Watanabe
ea1a2928d2
Replace newstr with object. Use OBJECT * instead of char *. Fix a few bugs uncovered by the better typechecking.
...
[SVN r75609]
2011-11-22 23:04:09 +00:00
Steven Watanabe
86278a4624
Fix memory leaks. Make sure that newstr and copystr are always used as needed.
...
[SVN r75502]
2011-11-16 03:00:54 +00:00
Vladimir Prus
7df1f2f4af
Kill 'engine/src', moving all content to 'engine'.
...
[SVN r68592]
2011-02-01 08:16:47 +00:00
Vladimir Prus
0f77dbdae2
Move tools/jam into tools/build/v2/engine
...
[SVN r64010]
2010-07-14 10:37:12 +00:00
Rene Rivera
c26a94ffd8
Let the child bjam commands inherit stdin, as some commands assume it's available. ( fixes #1577 )
...
[SVN r49883]
2008-11-23 02:37:44 +00:00
Rene Rivera
c06917cd60
On Windows don't limit bjam output to ASCII as some tools output characters in extended character sets. ( fixes #1576 )
...
[SVN r49882]
2008-11-23 02:10:52 +00:00
Jurko Gospodnetić
b14209b789
Major stylistic changes throughout the Boost Jam source base. No implementation changes.
...
Cleanup done while researching the Boost Jam internals. Added better implementation description comments at many places. Cleaned up the 'dependant' and 'dependency' terminology that got mixed up in several places. Renamed several functions to use underscores as word separators.
[SVN r48480]
2008-08-30 23:56:49 +00:00
Jurko Gospodnetić
84c8a57403
Minor stylistic changes throughout Boost Jam sources. Mostly corrected indentation, removed trailing spaces and updated comments.
...
[SVN r48445]
2008-08-29 12:59:49 +00:00
Jurko Gospodnetić
62cd6929b4
Minor stylistic Boost Jam & Boost Build module changes.
...
[SVN r48301]
2008-08-23 03:12:27 +00:00
Jurko Gospodnetić
a7aec314cb
Added Boost Jam support for executing command lines longer than 2047 characters (up to 8191) characters when running on Windows XP or later OS version. Patch contributed by Franz Schnyder.
...
See http://support.microsoft.com/default.aspx?scid=kb;en-us;830473 for more detailed information on Windows cmd.exe shell command-line length limitations.
[SVN r47913]
2008-07-31 17:41:40 +00:00
Jurko Gospodnetić
556474bbb2
Solved the problem with child process returning the value 259 (Windows constant STILL_ACTIVE) causing bjam never to detect that it exited and therefore keep running in an endless loop. Done by relying on the Windows WaitForMultipleObjects() function to detect when a process has exited instead of GetExitCodeProcess(). The later function's MSDN article ( http://msdn2.microsoft.com/en-us/library/ms683189(VS.85).aspx ) warns about this problem.
...
Solved the problem with bjam going into an active wait state, hogging up processor resources, when waiting for one of its child processes to terminate while not all of its available child process slots are being used. To see this bug in action, try compiling a simple C++ program on a 2 processor PC with the -j 2 command-line option and watching how much processor resources bjam uses while linking. Was caused by treating unused process slots as used in the try_wait() function, causing the WaitForMultipleObjects() Windows API call to exit instantly with an error which was then getting incorrectly interpreted as a timeout, starting the whole cycle anew.
Solved a race condition between bjam's output reading/child process termination detection and the child process's output generation/termination which could have caused bjam not to collect the terminated process's final output.
Extracted all GetExitCodeProcess() API calls into one location so it no longer gets called in three separate places.
Minor comment changes in code touched by previous fixes.
[SVN r44087]
2008-04-07 09:55:18 +00:00
Rene Rivera
6f12bd5e02
Revert various changes that break backward compatibility, and also some minor edits.
...
[SVN r42632]
2008-01-09 04:31:58 +00:00
Jurko Gospodnetić
8ffe82aaaa
Tried trailing spaces. Minor comment typo corrections.
...
[SVN r42627]
2008-01-09 01:11:03 +00:00
Rene Rivera
7e35e8c18a
Work around some Windows CMD.EXE programs that will fail executing a totally empty batch file.
...
[SVN r41626]
2007-12-03 02:57:49 +00:00
Rene Rivera
e2ae7d0a18
Plug memory leak when closing out actions. Thanks to Martin Kortmann for finding this.
...
[SVN r41535]
2007-12-01 16:44:54 +00:00
Rene Rivera
000431fdc1
build-system.jam
...
* Reflect added start/end timestamps for actions in xml output. And update action rules for new args.
execcmd.h
* Add start/end timestamps to action timing info.
execnt.c
* Fix filetime_seconds calculation when time is larger than low 32 bit value.
* Add calc of C time_t from Windows FILETIME.
* Add start/end timestamps recording to action timing info.
execunix.c
* Add start/end timestamps recording to action timing info.
jam.c
* Change JAMDATE to use common ISO date format.
make1.c
* Redo __TIMING_RULE__ and __ACTION__RULE__ invocations to new argument ordering and added end/result timestamp values.
[SVN r41431]
2007-11-28 07:21:49 +00:00
Rene Rivera
f267ee63a7
Add partial code for indicating to the output function that a command finished because of a timeout.
...
[SVN r39416]
2007-09-20 16:31:44 +00:00
Roland Schwarz
9801916f14
A small fix, so -d+2 will always show the "real" commands being executed instead of casually the name of a temporary batch file.
...
[SVN r38483]
2007-08-06 20:20:26 +00:00
Rene Rivera
a834daf2e0
Delete commented out code.
...
[SVN r38038]
2007-06-19 14:32:32 +00:00