civodul pushed a commit to branch nix
in repository guix.
commit 3bfa70b7963e12be346900e64ae45fa019850675
Author: Eelco Dolstra <[email protected]>
Date: Wed Dec 10 13:53:04 2014 +0100
Don't wait for PID -1
The pid field can be -1 if forking the substituter process failed.
---
nix/libstore/local-store.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc
index e3de33b..c262b81 100644
--- a/nix/libstore/local-store.cc
+++ b/nix/libstore/local-store.cc
@@ -358,7 +358,8 @@ LocalStore::~LocalStore()
i->second.to.close();
i->second.from.close();
i->second.error.close();
- i->second.pid.wait(true);
+ if (i->second.pid != -1)
+ i->second.pid.wait(true);
}
} catch (...) {
ignoreException();