2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-30 22:05:46 +00:00

save errno from being clobbered by wait(). From Theo

This commit is contained in:
Todd C. Miller
1997-08-06 18:58:06 +00:00
parent 8b28002ef3
commit b5f54d7740

View File

@@ -536,10 +536,13 @@ static void send_mail()
static RETSIGTYPE reapchild(sig)
int sig;
{
int save_errno = errno;
(void) wait(NULL);
#ifndef POSIX_SIGNALS
(void) signal(SIGCHLD, reapchild);
#endif /* POSIX_SIGNALS */
errno = save_errno;
}