about summary refs log tree commit diff
path: root/src/libutil/util.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-12-03T02·12+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-12-03T02·12+0000
commit363f40022f08b3a7f5571574ddecf785db39584a (patch)
tree3e3223ac46669db23b7f3a27c61ead9c34efbf62 /src/libutil/util.cc
parent7951c3c5460324c652d42f5f92bcae44e0a0b9c7 (diff)
* Pid::kill() should be interruptable.
Diffstat (limited to 'src/libutil/util.cc')
-rw-r--r--src/libutil/util.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 4460d95b8e42..7c1138720cd3 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -685,9 +685,11 @@ void Pid::kill()
 
     /* Wait until the child dies, disregarding the exit status. */
     int status;
-    while (waitpid(pid, &status, 0) == -1)
+    while (waitpid(pid, &status, 0) == -1) {
+        checkInterrupt();
         if (errno != EINTR) printMsg(lvlError,
             (SysError(format("waiting for process %1%") % pid).msg()));
+    }
 
     pid = -1;
 }