2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00
Commit Graph

3573 Commits

Author SHA1 Message Date
K. Noel Belcourt
2f5d59569d Another patch to fix the -lx timeout code. Some actions spawn
sub-processes after bjam forks a new process (for example, after
g++ is forked by bjam, g++ then forks sub-processes like cc1plus).
The timeout code would kill the g++ process, but might not kill
the subprocesses spawned by g++.

I fixed this problem by making the bjam fork'ed process (g++) a 
session leader by calling setsid() before calling exec.  The setsid 
call, in essence, gives all child processes a parent process id 
(ppid) of the g++ process id.  This guarantees that killing g++ 
will kill all child processes spawned by g++ as well.

One last comment on the maximum process time before a process is actually
killed.  The worst case process elapsed time is 2x seconds if -lx is
given.  The reason is that a process might be one second away from being
killed and, if there's no other signal activity, the select function will
wait x seconds before timing out and killing any active processes.  So
if you say -lx and monitor a build known to have lengthy processes, you 
may see a process with up to 2x seconds of time before it is killed.



[SVN r39467]
2007-09-21 22:38:17 +00:00
Rene Rivera
1052ed2cbc Adjust timing to avoid spurious test failures on busy machines.
[SVN r39466]
2007-09-21 21:01:45 +00:00
K. Noel Belcourt
b98a038361 Added diagnostic message to output.c to inform users
when a process has timed out and been killed.

Because timed out processes now emit a diagnostic, I
had to update option_l.jam so we wouldn't break test.sh
when it runs.

Minor cleanup to execunix.c to remove unneeded code
and to set the process exit status as returned from
waitpid.  The exit status is used to identify timed
out processes so we can emit a diagnostic to the user.



[SVN r39423]
2007-09-20 19:06:54 +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
Boris Gubenko
cba8401523 add -AA to link actions, remove +DD64
[SVN r39409]
2007-09-20 12:42:27 +00:00
Rene Rivera
ed293dd9ad Now that the exec*.c files are really platform specific, adjust the build script to only build the needed ones for MinGW.
[SVN r39400]
2007-09-20 04:36:27 +00:00
K. Noel Belcourt
cdffd8e28e Fix a bug Chris Cambly reported with the timeout code on
AIX.  Apparently AIX doesn't permit a forked process to 
reference (set) memory in the parent's address space.  No 
other system seems to object to this practice but it taught
me a lesson!

The fix was to move the call to get the child process start 
time directly before calling vfork.  This isn't really fair 
to the forked process as we start counting time against the
child process that we haven't even forked (we count the 
vfork/exec call overhead against the child process).

Tested Rene's test.sh script on Sun, Linux, AIX, and Sgi.



[SVN r39399]
2007-09-20 04:11:11 +00:00
Rene Rivera
a37493c285 Work around boostbook path issues.
[SVN r39397]
2007-09-19 19:47:25 +00:00
Rene Rivera
08458f4597 Make get-values preserve the values exactly, instead of treating them like paths and hence munging them.
[SVN r39395]
2007-09-19 19:29:31 +00:00
Rene Rivera
26281fe0d4 Remove some outdated comments as some bugs are now fixed. Try to work around boostbook XSL.
[SVN r39385]
2007-09-19 04:54:30 +00:00
K. Noel Belcourt
7aa07c8664 Update the mipspro.jam file so have the compiler
emit each referenced template in the object file
where referenced and then rely on the linker to
remove duplicates.

Added some missing macros to sgi_mipspro.hpp.



[SVN r39382]
2007-09-19 02:59:00 +00:00
K. Noel Belcourt
30607d79c5 Remove unnecessary overhead in execunix.c related to
the timeout implementation.  Also removed unused variables
as diagnosed by the Sgi (mipspro) compiler.

Fixed const-correctness error in operations.hpp that
Sgi complained about.

There's no strerror_r function on Irix 6.5 so I replaced
it with a strerror call.

With these changes, I can now build process jam log and
start running Sgi tests.



[SVN r39378]
2007-09-18 22:46:26 +00:00
Rene Rivera
9b86b6de5a Replace breaks, to remove warnings, with custom structural templates.
[SVN r39367]
2007-09-18 17:02:04 +00:00
Vladimir Prus
9762b1f3dd Expand aCC documentation
[SVN r39362]
2007-09-18 11:44:13 +00:00
K. Noel Belcourt
4870d72e91 A minor optimization to eliminate two OS calls (one
to times, one to kill).  Now all expired processes
are killed in one place.  If the select command
times out, I set each processes start_time to zero
to ensure it is picked up as an expired process.



[SVN r39361]
2007-09-18 03:27:48 +00:00
K. Noel Belcourt
04868e21a2 Fix One more obscure way for the timeout to miss processes.
If select times out (no processes terminated), then all running
processes can be terminated.  Cleaned up code when this condition
applies.



[SVN r39360]
2007-09-18 02:42:13 +00:00
K. Noel Belcourt
70d2f9a567 Rene found a problem with the code I committed to
terminate expired processes.  This patch basically
causes the select function to return after -l seconds.
This gives me a shot at killing processes still
running.



[SVN r39358]
2007-09-17 23:30:57 +00:00
Rene Rivera
30200dfad1 Handle invalid formats of @() as doing a straight substitution instead of erroring out.
[SVN r39357]
2007-09-17 21:35:58 +00:00
Rene Rivera
b0afd67e56 Add test for no-op @() expansion.
[SVN r39355]
2007-09-17 20:00:18 +00:00
Vladimir Prus
a85d38d083 Allow to specify version, and explicitly specify
the command, when initializing the acc toolset.


[SVN r39354]
2007-09-17 19:29:06 +00:00
Rene Rivera
7bee0360ec Add test of -l limit option now that it's implemented on windows and unix.
[SVN r39352]
2007-09-17 16:58:10 +00:00
Rene Rivera
1e4f85ff24 Add internal dependencies for multi-file generating actions to indicate that the targets all only appear when the first target appears. (fixes ticket #431)
[SVN r39341]
2007-09-17 08:32:24 +00:00
Rene Rivera
8a8cb0f0d9 Really fix missing INT_MAX declaration. And fix pma.jam test on Unix.
[SVN r39336]
2007-09-17 00:54:20 +00:00
Rene Rivera
a13eb14a1c Add test for ticket #431.
[SVN r39335]
2007-09-17 00:44:16 +00:00
K. Noel Belcourt
0ab51f6341 Added missing #include <utility> and qualified
make_pair with std:: to library_status.cpp.

Added missing headers to make1.c and missing prototypes
to builtin.h

Modified execunix.c to add support for terminating
processes that consume too much cpu or that hang and
fail to consume cpu at all.  This in support of the
bjam -lx option.

http://svn.boost.org/trac/boost/ticket/1266#comment:2



[SVN r39334]
2007-09-17 00:27:37 +00:00
Rene Rivera
a0275aa3c6 Fix undeclared INT_MAX on some platforms, i.e. Linux.
[SVN r39332]
2007-09-16 22:13:02 +00:00
Rene Rivera
6832a395a9 Define OSPLAT var unconditionally, and more generically, when possible. (fixes #798)
[SVN r39331]
2007-09-16 21:55:02 +00:00
Rene Rivera
a0cea58bba Implement @() expansion during parse phase. (fixes #721)
[SVN r39330]
2007-09-16 21:35:19 +00:00
Rene Rivera
2f178b0841 Call the correct subjam file.
[SVN r39295]
2007-09-15 04:33:32 +00:00
Vladimir Prus
913ad3ded4 Remove acc_pa_risc.jam. Given that it's a copy
of acc.jam with only toolset name changed, I see
no point in having this file.


[SVN r39268]
2007-09-14 15:30:42 +00:00
Vladimir Prus
856a41141e * gcc.jam (init-link-flags): Add missing
'unchecked'. This was breaking intel.


[SVN r39267]
2007-09-14 15:28:13 +00:00
Vladimir Prus
8ee55c0651 Don't run gcc_runtime test on msvc
[SVN r39197]
2007-09-11 19:36:48 +00:00
Vladimir Prus
47883c1710 * BoostBuild.py (wait_for_time_change): Wait
for more serious time change, in order to
        fix sporadic dependency_test failures.


[SVN r39195]
2007-09-11 19:17:49 +00:00
Vladimir Prus
ef24b573cf Don't try to apply --build-dir to standalone projects.
Fixes build_dir test failure on linux.


[SVN r39194]
2007-09-11 19:16:06 +00:00
Vladimir Prus
bcc1770d08 Record failure reason when we fail to open a file.
[SVN r39169]
2007-09-08 17:10:26 +00:00
Vladimir Prus
c349da3998 Fix the rebuilds test on linux.
* BoostBuild.py (wait_for_time_change): Use floor,
	to avoid waiting 0.5 seconds.
	* rebuilds.py: Wait for time change as necessary.

[SVN r39168]
2007-09-08 16:24:50 +00:00
Vladimir Prus
faedb8b0ef Print test results summary at the end
[SVN r39166]
2007-09-08 00:26:18 +00:00
Vladimir Prus
526f85c280 Fix remove_requirements test. I have no idea how
it could have passed as-is.


[SVN r39165]
2007-09-08 00:15:23 +00:00
Vladimir Prus
44298f02c7 Implement --ignore-toolset-requirements and set in
during testing.


[SVN r39164]
2007-09-07 23:59:54 +00:00
Vladimir Prus
216e84fba9 Make it work
[SVN r39163]
2007-09-07 23:59:10 +00:00
Vladimir Prus
109fba60a0 Undo #38702, which fixes alternative.py on linux. Real fix for win coming soon.
[SVN r39162]
2007-09-07 23:51:07 +00:00
Vladimir Prus
28f5cfdd14 Make output from test run nicer, and more structured.
In future, we might be able to generate XML, or any other voodoo
we want.


[SVN r39161]
2007-09-07 23:18:20 +00:00
Vladimir Prus
42bc94fdc5 Adjust faq entry about targets in site-config.jam
[SVN r39160]
2007-09-07 21:34:27 +00:00
Boris Gubenko
840201ae89 Boost.Build V2 toolset for the HP aC++ compiler on PA-RISC
[SVN r39132]
2007-09-05 23:43:40 +00:00
Vladimir Prus
59b793fdc2 Remove unnecessary line
[SVN r39128]
2007-09-05 08:03:17 +00:00
Vladimir Prus
7cbb1b9b42 Unbreak the gcc_runtime test
[SVN r39121]
2007-09-04 20:29:56 +00:00
Vladimir Prus
258f36f179 Allow to print the tree delta to any file.
[SVN r39120]
2007-09-04 20:26:19 +00:00
Roland Schwarz
b3ec4fc36d Make use of gnu ld's -Bstatic and -Bdynamic switches to choose order of libraries searched by -l switch.
[SVN r39113]
2007-09-03 19:38:40 +00:00
Roland Schwarz
793f19ac11 Changed library naming convention for mingw and cygwin. For details see comment in file. Also should resolve Ticket #1058 .
[SVN r39107]
2007-09-02 18:37:14 +00:00
Vladimir Prus
c2db8be793 Previously, I've accidentally committed a patch
to make <tag> affect names of searched libraries.
This commit greatly simplifies that.


[SVN r39105]
2007-09-01 22:10:46 +00:00