From: Todd C. Miller Date: Tue, 6 Feb 2007 18:23:45 +0000 (+0000) Subject: Restore signal mask before calling reapchild(). Fixes a possible race X-Git-Tag: SUDO_1_7_0~582 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=832f4c37680e381cb85b9640c0ac60345e4b9720;p=sudo Restore signal mask before calling reapchild(). Fixes a possible race condition that could prevent sudo from properly waiting for the child. --- diff --git a/logging.c b/logging.c index a6c773a36..aafc77c70 100644 --- a/logging.c +++ b/logging.c @@ -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); } /*