diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-10T12·53+0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-12-10T12·53+0100 |
commit | e529823635c8efee0d96a73fb90117ac81040710 (patch) | |
tree | 9c04c1af7a211a119c96f81042244b026d4c4a6a /src/libstore | |
parent | ad332e17189668d18aeeea2f61384f749d428d6a (diff) |
Don't wait for PID -1
The pid field can be -1 if forking the substituter process failed.
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/local-store.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/local-store.cc b/src/libstore/local-store.cc index fc48c0405650..9bd03178ed9b 100644 --- a/src/libstore/local-store.cc +++ b/src/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(); |