aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index e67568b1a..b1231e455 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -790,6 +790,7 @@ void Pid::kill()
int Pid::wait(bool block)
{
+ assert(pid != -1);
while (1) {
int status;
int res = waitpid(pid, &status, block ? 0 : WNOHANG);