From 3bfa70b7963e12be346900e64ae45fa019850675 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Dec 2014 13:53:04 +0100 Subject: 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 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/libstore/local-store.cc b/nix/libstore/local-store.cc index e3de33b6e4..c262b81f1d 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(); -- cgit 1.4.1