diff options
author | 2009-10-28 20:30:41 +0000 | |
---|---|---|
committer | 2009-10-28 20:30:41 +0000 | |
commit | 72ba9966f7da0118bbd52c04708b1538762e403e (patch) | |
tree | 080b7efd0a9b4bc0e6811a6dc6547385236d98c0 | |
parent | Update to terminfo-20091003, now maintained by Thomas Dickey as part (diff) | |
download | wireguard-openbsd-72ba9966f7da0118bbd52c04708b1538762e403e.tar.xz wireguard-openbsd-72ba9966f7da0118bbd52c04708b1538762e403e.zip |
Err out if either sigaction fails and not just when both do.
ok otto@
-rw-r--r-- | bin/pax/pax.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/pax/pax.c b/bin/pax/pax.c index f89ca349419..5bbf6cc70e2 100644 --- a/bin/pax/pax.c +++ b/bin/pax/pax.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pax.c,v 1.29 2009/10/27 23:59:22 deraadt Exp $ */ +/* $OpenBSD: pax.c,v 1.30 2009/10/28 20:30:41 guenther Exp $ */ /* $NetBSD: pax.c,v 1.5 1996/03/26 23:54:20 mrg Exp $ */ /*- @@ -385,27 +385,27 @@ gen_init(void) n_hand.sa_flags = 0; n_hand.sa_handler = sig_cleanup; - if ((sigaction(SIGHUP, &n_hand, &o_hand) < 0) && + if ((sigaction(SIGHUP, &n_hand, &o_hand) < 0) || (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGHUP, &o_hand, &o_hand) < 0)) goto out; - if ((sigaction(SIGTERM, &n_hand, &o_hand) < 0) && + if ((sigaction(SIGTERM, &n_hand, &o_hand) < 0) || (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGTERM, &o_hand, &o_hand) < 0)) goto out; - if ((sigaction(SIGINT, &n_hand, &o_hand) < 0) && + if ((sigaction(SIGINT, &n_hand, &o_hand) < 0) || (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGINT, &o_hand, &o_hand) < 0)) goto out; - if ((sigaction(SIGQUIT, &n_hand, &o_hand) < 0) && + if ((sigaction(SIGQUIT, &n_hand, &o_hand) < 0) || (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGQUIT, &o_hand, &o_hand) < 0)) goto out; - if ((sigaction(SIGXCPU, &n_hand, &o_hand) < 0) && + if ((sigaction(SIGXCPU, &n_hand, &o_hand) < 0) || (o_hand.sa_handler == SIG_IGN) && (sigaction(SIGXCPU, &o_hand, &o_hand) < 0)) goto out; |