diff options
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pkg_install/files/lib/pexec.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pkgtools/pkg_install/files/lib/pexec.c b/pkgtools/pkg_install/files/lib/pexec.c index b5b3019ac65..1358aedb910 100644 --- a/pkgtools/pkg_install/files/lib/pexec.c +++ b/pkgtools/pkg_install/files/lib/pexec.c @@ -93,12 +93,13 @@ int pipe_to_system_end(pipe_to_system_t *to_pipe) int wait_ret; fclose(to_pipe->fp); - wait_ret = waitpid(to_pipe->pid, &status, 0); + do { + wait_ret = waitpid(to_pipe->pid, &status, 0); + } while (wait_ret == -1 && errno == EINTR); + if (wait_ret < 0) { - if (errno != EINTR) { - call_callback(to_pipe->cleanup); - errx(2, "waitpid returned failure"); - } + call_callback(to_pipe->cleanup); + errx(2, "waitpid returned failure"); } if (!WIFEXITED(status)) { call_callback(to_pipe->cleanup); |