diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-04 05:37:54 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-05-04 05:37:54 +0000 |
commit | 7c88b13a799889e879308794cf19b7522908d8df (patch) | |
tree | 0fecff7fd89b96609ed82fda93e33ca1cd6a5b82 /usr.bin/mail/popen.c | |
parent | a69cca63880811a6afaeb7a83b0dcc60b94ae4b0 (diff) |
Never remove a mail spool, as we may not have proper prics, just truncate. Also block signals in a few critical areas
Diffstat (limited to 'usr.bin/mail/popen.c')
-rw-r--r-- | usr.bin/mail/popen.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c index 0d83687872b..59074db2bf3 100644 --- a/usr.bin/mail/popen.c +++ b/usr.bin/mail/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.15 1998/02/15 21:20:02 niklas Exp $ */ +/* $OpenBSD: popen.c,v 1.16 1998/05/04 05:37:52 millert Exp $ */ /* $NetBSD: popen.c,v 1.6 1997/05/13 06:48:42 mikel Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)popen.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: popen.c,v 1.15 1998/02/15 21:20:02 niklas Exp $"; +static char rcsid[] = "$OpenBSD: popen.c,v 1.16 1998/05/04 05:37:52 millert Exp $"; #endif #endif /* not lint */ @@ -356,7 +356,10 @@ sigchild(signo) int status; struct child *cp; int save_errno = errno; + sigset_t set, oset; + (void)sigfillset(&set); + (void)sigprocmask(SIG_BLOCK, &set, &oset); while ((pid = waitpid((pid_t)-1, &status, WNOHANG)) > 0) { cp = findchild(pid, 1); @@ -369,6 +372,7 @@ sigchild(signo) cp->status = status; } } + (void)sigprocmask(SIG_SETMASK, &oset, NULL); errno = save_errno; } |