2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Don't bother with sudo_waitpid() here for now.

This commit is contained in:
Todd C. Miller
2009-10-24 18:32:44 +00:00
parent 50f5d55163
commit 61b57817a5

View File

@@ -822,17 +822,9 @@ sigchild(s)
pid_t pid;
int serrno = errno;
#ifdef sudo_waitpid
do {
pid = sudo_waitpid(child, &child_status, WNOHANG | WUNTRACED);
if (pid == child)
break;
} while (pid > 0 || (pid == -1 && errno == EINTR));
#else
do {
pid = wait(&child_status);
pid = waitpid(child, &child_status, WNOHANG | WUNTRACED);
} while (pid == -1 && errno == EINTR);
#endif
if (pid == child) {
if (WIFSTOPPED(child_status))
suspended = WSTOPSIG(child_status);