Check the return code of the clone() call

This commit is contained in:
Eelco Dolstra 2012-06-27 09:52:06 -04:00
parent 1db38ae81b
commit 3ee208516f

View file

@ -1806,9 +1806,10 @@ void DerivationGoal::startBuilder()
{
pid = fork();
if (pid == 0) initChild();
else if (pid == -1) throw SysError("unable to fork");
}
if (pid == -1) throw SysError("unable to fork");
/* parent */
pid.setSeparatePG(true);
builderOut.writeSide.close();