forked from lix-project/lix
* Pid::kill() should be interruptable.
This commit is contained in:
parent
7951c3c546
commit
363f40022f
|
@ -685,9 +685,11 @@ void Pid::kill()
|
||||||
|
|
||||||
/* Wait until the child dies, disregarding the exit status. */
|
/* Wait until the child dies, disregarding the exit status. */
|
||||||
int status;
|
int status;
|
||||||
while (waitpid(pid, &status, 0) == -1)
|
while (waitpid(pid, &status, 0) == -1) {
|
||||||
|
checkInterrupt();
|
||||||
if (errno != EINTR) printMsg(lvlError,
|
if (errno != EINTR) printMsg(lvlError,
|
||||||
(SysError(format("waiting for process %1%") % pid).msg()));
|
(SysError(format("waiting for process %1%") % pid).msg()));
|
||||||
|
}
|
||||||
|
|
||||||
pid = -1;
|
pid = -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue