Check the return code of the clone() call
This commit is contained in:
parent
1db38ae81b
commit
3ee208516f
1 changed files with 2 additions and 1 deletions
|
@ -1806,9 +1806,10 @@ void DerivationGoal::startBuilder()
|
||||||
{
|
{
|
||||||
pid = fork();
|
pid = fork();
|
||||||
if (pid == 0) initChild();
|
if (pid == 0) initChild();
|
||||||
else if (pid == -1) throw SysError("unable to fork");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pid == -1) throw SysError("unable to fork");
|
||||||
|
|
||||||
/* parent */
|
/* parent */
|
||||||
pid.setSeparatePG(true);
|
pid.setSeparatePG(true);
|
||||||
builderOut.writeSide.close();
|
builderOut.writeSide.close();
|
||||||
|
|
Loading…
Reference in a new issue