diff options
author | 1998-06-12 18:07:54 +0000 | |
---|---|---|
committer | 1998-06-12 18:07:54 +0000 | |
commit | 9f0d12ce82b44a1a337be4d8b64a432d2ae7b580 (patch) | |
tree | 784610699e9faed89bc7e0b5585b31817df809e4 | |
parent | Don't call truncate() directly; have rm() do it if we get EPERM on unlink() (diff) | |
download | wireguard-openbsd-9f0d12ce82b44a1a337be4d8b64a432d2ae7b580.tar.xz wireguard-openbsd-9f0d12ce82b44a1a337be4d8b64a432d2ae7b580.zip |
back out some signal changes that can cause mail to hang when quitting due to SIGCHLD blockage
-rw-r--r-- | usr.bin/mail/collect.c | 15 | ||||
-rw-r--r-- | usr.bin/mail/lex.c | 8 | ||||
-rw-r--r-- | usr.bin/mail/popen.c | 8 |
3 files changed, 6 insertions, 25 deletions
diff --git a/usr.bin/mail/collect.c b/usr.bin/mail/collect.c index 8f5492c1728..cbee1730d5e 100644 --- a/usr.bin/mail/collect.c +++ b/usr.bin/mail/collect.c @@ -1,4 +1,4 @@ -/* $OpenBSD: collect.c,v 1.16 1998/05/04 05:37:47 millert Exp $ */ +/* $OpenBSD: collect.c,v 1.17 1998/06/12 18:07:54 millert Exp $ */ /* $NetBSD: collect.c,v 1.9 1997/07/09 05:25:45 mikel Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)collect.c 8.2 (Berkeley) 4/19/94"; #else -static char rcsid[] = "$OpenBSD: collect.c,v 1.16 1998/05/04 05:37:47 millert Exp $"; +static char rcsid[] = "$OpenBSD: collect.c,v 1.17 1998/06/12 18:07:54 millert Exp $"; #endif #endif /* not lint */ @@ -631,29 +631,22 @@ void collint(s) int s; { - sigset_t set, oset; - /* * the control flow is subtle, because we can be called from ~q. */ - (void)sigfillset(&set); - (void)sigprocmask(SIG_BLOCK, &set, &oset); if (hadintr == 0 && isatty(0)) { if (value("ignore") != NULL) { puts("@"); fflush(stdout); clearerr(stdin); - (void)sigprocmask(SIG_SETMASK, &oset, NULL); return; } hadintr = 1; - (void)sigprocmask(SIG_SETMASK, &oset, NULL); siglongjmp(colljmp, 1); } rewind(collf); if (value("nosave") == NULL) savedeadletter(collf); - (void)sigprocmask(SIG_SETMASK, &oset, NULL); siglongjmp(collabort, 1); } @@ -662,10 +655,6 @@ void collhup(s) int s; { - sigset_t set; - - (void)sigfillset(&set); - (void)sigprocmask(SIG_BLOCK, &set, NULL); rewind(collf); savedeadletter(collf); /* diff --git a/usr.bin/mail/lex.c b/usr.bin/mail/lex.c index 748e7ce6e3f..73ef70c87b5 100644 --- a/usr.bin/mail/lex.c +++ b/usr.bin/mail/lex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lex.c,v 1.16 1998/05/04 05:37:49 millert Exp $ */ +/* $OpenBSD: lex.c,v 1.17 1998/06/12 18:07:57 millert Exp $ */ /* $NetBSD: lex.c,v 1.10 1997/05/17 19:55:13 pk Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95"; #else -static char rcsid[] = "$OpenBSD: lex.c,v 1.16 1998/05/04 05:37:49 millert Exp $"; +static char rcsid[] = "$OpenBSD: lex.c,v 1.17 1998/06/12 18:07:57 millert Exp $"; #endif #endif /* not lint */ @@ -549,10 +549,7 @@ void intr(s) int s; { - sigset_t set, oset; - (void)sigfillset(&set); - (void)sigprocmask(SIG_BLOCK, &set, &oset); noreset = 0; if (!inithdr) sawcom++; @@ -568,7 +565,6 @@ intr(s) } fputs("Interrupt\n", stderr); reset(0); - (void)sigprocmask(SIG_SETMASK, &oset, NULL); } /* diff --git a/usr.bin/mail/popen.c b/usr.bin/mail/popen.c index 2292b7dc5ba..ce8474fa390 100644 --- a/usr.bin/mail/popen.c +++ b/usr.bin/mail/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.17 1998/06/12 17:51:53 millert Exp $ */ +/* $OpenBSD: popen.c,v 1.18 1998/06/12 18:07:58 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.17 1998/06/12 17:51:53 millert Exp $"; +static char rcsid[] = "$OpenBSD: popen.c,v 1.18 1998/06/12 18:07:58 millert Exp $"; #endif #endif /* not lint */ @@ -356,10 +356,7 @@ 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); @@ -372,7 +369,6 @@ sigchild(signo) cp->status = status; } } - (void)sigprocmask(SIG_SETMASK, &oset, NULL); errno = save_errno; } |