Restore signal mask before calling reapchild(). Fixes a possible race

condition that could prevent sudo from properly waiting for the child.
This commit is contained in:
Todd C. Miller
2007-02-06 18:23:45 +00:00
parent 51d61f148f
commit 832f4c3768

View File

@@ -535,9 +535,9 @@ send_mail(line)
get_timestr(), user_name, line);
fclose(mail);
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
/* If mailer is done, wait for it now. If not, we'll get it later. */
reapchild(SIGCHLD);
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
}
/*