From 363f40022f08b3a7f5571574ddecf785db39584a Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sun, 3 Dec 2006 02:12:26 +0000 Subject: [PATCH] * Pid::kill() should be interruptable. --- src/libutil/util.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 4460d95b8..7c1138720 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; }