2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-22 09:57:41 +00:00

Block all signals in Exit() to avoid a signal race. There is still a

tiny window but I'm not going to worry about it.
This commit is contained in:
Todd C. Miller 2001-01-17 16:34:36 +00:00
parent aeb8cefc42
commit af80178b85

View File

@ -653,6 +653,18 @@ static RETSIGTYPE
Exit(sig)
int sig;
{
#ifdef POSIX_SIGNALS
sigset_t mask;
sigfillset(&mask);
(void) sigprocmask(SIG_BLOCK, &mask, NULL);
#else
unsigned int mask;
mask = 0xffffffff;
(void) sigblock((int) mask);
#endif /* POSIX_SIGNALS */
(void) unlink(stmp);
if (sig > 0)