From 3ee208516fbdd302b178d68a20dd44517a276a96 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 Jun 2012 09:52:06 -0400 Subject: [PATCH] Check the return code of the clone() call --- src/libstore/build.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstore/build.cc b/src/libstore/build.cc index f09437c6b..e7a8ee434 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();