restart waitpid if it returns with EINTR.
This commit is contained in:
@@ -1741,7 +1741,8 @@ sync_out:
|
|||||||
int ret;
|
int ret;
|
||||||
pid_t pid = w.sr.args[0];
|
pid_t pid = w.sr.args[0];
|
||||||
|
|
||||||
if ((ret = waitpid(pid, &status, 0)) != pid) {
|
while ((ret = waitpid(pid, &status, 0)) == -1 && errno == EINTR);
|
||||||
|
if(ret != pid) {
|
||||||
fprintf(stderr, "ERROR: waiting for %lu\n", w.sr.args[0]);
|
fprintf(stderr, "ERROR: waiting for %lu\n", w.sr.args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user