boostorg/build — pull request #47 by aminiussi (2014-10-28 10:07:25+00:00)
Title: bjam hang on defunct subprocesses, sometime.

Sometime being **once**, to be honest. More specifically, [mpiexec.hydra](https://wiki.mpich.org/mpich/index.php/Using_the_Hydra_Process_Manager) from the Intel MPI distribution (version 5.?).
This is triggered when running the regression test, since this is the only situation where the MPI launcher is supposed to be used.
So it's quite specific. Still.

The problem has been discussed in a [thread ob boost users list](http://boost.2283326.n4.nabble.com/bjam-hangs-on-select-in-develop-branch-td4668391.html). In a nutshell:
It seems, or everything behaves as if, the *mpiexec.hydra* program send the **SIGSTOP** signal to its parents. If an ancestor (say, here, *bjam/b2*) enter a select with no (as in *NULL*) timeout, that select will hang forever (or at least until the paused program receives a **SIGCONT**, as verified throught the shell and debugger).

The proposed solution use a **0** value (as in {0, 0} *value*) for the select timeout parameter, making it work in pool mode, and interleaving a wakeup call to the sub processes. The subtask timeout itself is dealt with in the exec_wait function anyway since we explicitly kill the timed out tasks.

I added some error notification since I suspect these should not be left unnoticed.

Cheers!