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:
@@ -535,9 +535,9 @@ send_mail(line)
|
|||||||
get_timestr(), user_name, line);
|
get_timestr(), user_name, line);
|
||||||
fclose(mail);
|
fclose(mail);
|
||||||
|
|
||||||
|
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
|
||||||
/* If mailer is done, wait for it now. If not, we'll get it later. */
|
/* If mailer is done, wait for it now. If not, we'll get it later. */
|
||||||
reapchild(SIGCHLD);
|
reapchild(SIGCHLD);
|
||||||
(void) sigprocmask(SIG_SETMASK, &oset, NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user