From: K. Noel Belcourt (kbelco_at_[hidden])
Date: 2008-02-07 15:03:35
I've been having occasional problems running parallel (-j2) darwin
trunk regression tests on ppc G5 hardware under Mac OS 10.4.x. It
appears that a race condition, or other unsavory interaction,
randomly occurs between vfork and execvp. I've tried using execve,
as documented in the vfork man page, but the race condition still
occurs. Simply replacing vfork with fork fixes the occasional hangs
I've been seeing. While I am concerned about the increased overhead
of fork over vfork, I believe a robust parallel bjam is well worth
the increase in overhead.
Attached is a patch that replaces vfork with fork, only on ppc
darwin, along with a couple of minor patches. I've used the
__APPLE__ and __ppc__ macros to select fork over vfork. I'm open to
suggestions if there's a better set of macros to use.
I've tested this patch to ensure that (1) it fixes the darwin ppc
trunk tests and (2) doesn't break any other unix trunk regression
tests (Aix, Sun, Intel Darwin, Linux flavors). If there's no
objection, I'd like to commit this to the trunk.
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk