diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-06-27T13·52-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-06-27T13·52-0400 |
commit | 3ee208516fbdd302b178d68a20dd44517a276a96 (patch) | |
tree | 240476ad3d05f5ae99dc9358018f945dc9a09548 | |
parent | 1db38ae81bd91d781ece9c0cfb995e743e68e951 (diff) |
Check the return code of the clone() call
-rw-r--r-- | src/libstore/build.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/build.cc b/src/libstore/build.cc index f09437c6b3b0..e7a8ee434a50 100644 --- a/src/libstore/build.cc +++ b/src/libstore/build.cc @@ -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(); |