2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-18 01:52:17 +00:00
Commit Graph

43 Commits

Author SHA1 Message Date
Jurko Gospodnetić
0fcdc894ac 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
1130f9db85 Revert various changes that break backward compatibility, and also some minor edits.
[SVN r42632]
2008-01-09 04:31:58 +00:00
Jurko Gospodnetić
6140b4fcbc Tried trailing spaces. Minor comment typo corrections.
[SVN r42627]
2008-01-09 01:11:03 +00:00
Rene Rivera
cca76bfc6a 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
6d09870d20 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
585226c5d2 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
36e3b43722 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
8ab402a5af 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
4c1108f18e Delete commented out code.
[SVN r38038]
2007-06-19 14:32:32 +00:00
Nicola Musatti
2aa34fb9a3 Worked around a Borland problem
[SVN r38037]
2007-06-19 07:04:20 +00:00
Rene Rivera
21d13c7803 Fix to compile in Borland C99: CLOCKS_PER_SEC, and clock_t, can be a float.
[SVN r38034]
2007-06-19 03:00:46 +00:00
Rene Rivera
87d0504845 Implement running action commands through pipes (-p option) to fix jumbled output when using parallel execution with -j option. This is implemented for Unix variants, and Windows (Win32/NT). [ticket #994]
[SVN r38009]
2007-06-16 20:52:36 +00:00
Rene Rivera
91c713cc1a Implement gc of string only hash entries (note, doesn't work likely because a buffer overrun in var expand). Allocate all character data as atomic.
[SVN r35036]
2006-09-07 18:33:04 +00:00
Rene Rivera
ac30f01631 Cleanup memory allocation calls to use macros defined in new mem.h header. This new header will handle configuration of both memory allocator to use, and memory profiling.
[SVN r35029]
2006-09-07 03:57:02 +00:00
Vladimir Prus
d0cbd356a4 More patches from Bronek
[SVN r34724]
2006-07-25 05:50:44 +00:00
Vladimir Prus
fe301ad3f0 More auto-dialog-closing fixes from Bronek.
[SVN r34658]
2006-07-22 06:12:42 +00:00
Vladimir Prus
b9ff2093c0 Improvements in auto-closing on dialog boxes. In particular, new
check that parent's creation time is less than child's creation time.

Patch from Bronek Kozicki.


[SVN r34605]
2006-07-20 06:27:50 +00:00
Vladimir Prus
8fd23e4502 Improve auto-closing of dialog boxes.
- Don't close boxes owned by 'explorer.exe'.
  - Close dialog parented by csrss.exe ("Unable to locate component/dll")
  - Various cleanups

Patch from Bronek Kozicki.


[SVN r34536]
2006-07-15 05:54:35 +00:00
Rene Rivera
4cf428cc11 Fix out of order function definitions.
[SVN r34211]
2006-06-07 02:16:58 +00:00
Rene Rivera
5cb7524ce7 Make the action timeout attempt to also close any open dialogs before killing processes. Thanks to Bronek Kozicki.
[SVN r34210]
2006-06-06 23:58:07 +00:00
Rene Rivera
bac0a1a08b Workaround for failure to create command batch files. Thanks to Bronek Kozicki.
[SVN r31718]
2005-11-21 05:36:29 +00:00
Rene Rivera
bbfc813ec8 Add common path_tmpdir function to get system dependent path to temporary a directory.
[SVN r31509]
2005-10-31 06:36:54 +00:00
Rene Rivera
37a763d716 Add "-lx" option which limits the amount of time actions can run (in seconds). Currently only implemented for Windows NT and above.
[SVN r31266]
2005-10-10 20:33:22 +00:00
Rene Rivera
135cc00ef8 Variety of performance improvements.
* bjam; bump to version 3.1.12
* bjam; make it possible to build in MinGW/MSYS shell
* bjam; move profile code to debug.h/c to make it available for use everywhere
* bjam; cache all filesystem query operations, Unix and Windows only, include PWD and scanning
* bjam; add memory profile info, and sprinkle throught code
* bbv2; rewrite some while() loops into for() loops to reduce time and memory
* bbv2; keep a single instance counter instead of one per type to reduce memory use
* bjam+bbv2; change NORMALIZE_PATH builtin to join path parts to reduce memory use


[SVN r31177]
2005-10-03 00:47:36 +00:00
Rene Rivera
adcf936d3d Fix use of C++ declaration semantics/syntax, in C file. Well Aleksey fixed it already.. So just cleanup the indentation, etc.
[SVN r29257]
2005-05-28 16:02:54 +00:00
Aleksey Gurtovoy
08a9ef1d0a move definition to the top of the block to make code ANSI C compliant
[SVN r29256]
2005-05-28 15:56:31 +00:00
Dave Abrahams
9099c2955e Workaround for vc6 preprocessor bug.
[SVN r29252]
2005-05-27 18:32:23 +00:00
Dave Abrahams
bea9c85585 Finally, a real fix for the spawn problem, I hope.
[SVN r29250]
2005-05-27 17:06:30 +00:00
Dave Abrahams
f97111f4cb Eliminate undefined behavior and fix a spelling error.
[SVN r29238]
2005-05-27 03:18:08 +00:00
Dave Abrahams
5539d6e2b9 jam_src/
builtins.{c,h}
        Support for the REBUILDS rule
        remove unused variable

    rules.h
    make.c
        Support for the REBUILDS rule

    make1.c
        Support for the REBUILDS rule

        Support for recording timing information

        Restructured a case statement because it was masking a bug I
        introduced.

    execcmd.h
    execnt.c
    execunix.c
        Support for recording timing information
        Also removed NT-specific stuff from execunix

    expand.c
        Removed tabs from critical comment
        Added tab-width variable setting comment for emacs.

v2/test
    rebuilds.py, timedata.py, test_all.py
        Tests for REBUILDS and timing.


[SVN r27334]
2005-02-12 02:30:18 +00:00
Rene Rivera
342481bed3 Catch file open errors when creating batch command files. Thanks to Reece Dunn for catching the errors.
[SVN r26586]
2004-12-27 20:29:25 +00:00
Vladimir Prus
ce5b47e87d Remove temporary files on Windows. Patch from Dean Ashton.
[SVN r23777]
2004-07-19 10:30:29 +00:00
Rene Rivera
5a441aa093 Bump version to 3.1.10 for release.
Update copyrights to new Boost License.


[SVN r22987]
2004-06-01 05:42:36 +00:00
Rene Rivera
d5003fc843 Fix problem of setting JAMSHELL to % and executing quoted commands. That combination would cause spawn: invalid argument errors. Now quotes are removed from the command if they are present.
[SVN r22433]
2004-03-05 07:53:32 +00:00
Dave Abrahams
1b2c46c06e Fix EOL trimming
[SVN r17532]
2003-02-19 13:59:17 +00:00
Dave Abrahams
8c04955b76 fix for multiple simultaneous Jam sessions, to avoid overwriting
temporary .bat files, courtesy of "Anichini, Steve"
<Sanichini@midwaygames.com>


[SVN r16658]
2002-12-18 21:35:09 +00:00
Dave Abrahams
87c384dbaa Always use a .bat file unless forced to do otherwise
[SVN r13490]
2002-04-15 04:18:23 +00:00
Dave Abrahams
9190bf3ef1 bug fixes for Beman
[SVN r13346]
2002-04-02 19:27:00 +00:00
Dave Abrahams
fb3cbc13b0 More fixes for Win95. MAXLINE must be computed appropriately EVERYWHERE!
[SVN r11953]
2001-12-06 14:56:42 +00:00
Dave Abrahams
953932e4b7 Fixes for Win95/98 command handling, I hope.
[SVN r11910]
2001-12-04 18:19:24 +00:00
Dave Abrahams
86c3200cdd Fixed MAXLINE calculation for Win95/98 (I hope)
Added command-file capability for msvc and metrowerks static libraries
Changed MSVC-tools.jam so that it would work without the prior use of VCVARS32.BAT

----------------------------------------------------------------------
Modified Files:
	boost-base.jam metrowerks-tools.jam msvc-tools.jam
	jam_src/execnt.c jam_src/makedebugjam.bat
----------------------------------------------------------------------


[SVN r11852]
2001-12-02 15:41:39 +00:00
Dave Abrahams
7983e22211 Added copyright notices
[SVN r11662]
2001-11-11 13:01:26 +00:00
Dave Abrahams
49ba2cf8dd merged to main trunk
[SVN r11610]
2001-11-06 15:36:16 +00:00