Don't wait for PID -1

The pid field can be -1 if forking the substituter process failed.
This commit is contained in:
Eelco Dolstra 2014-12-10 13:53:04 +01:00 committed by Ludovic Courtès
parent 5241aec531
commit 3bfa70b796
1 changed files with 2 additions and 1 deletions

View File

@ -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();