aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Wienand <ianw@vmware.com>2011-04-16 20:05:14 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-04-16 20:05:14 +0200
commit89b3cbaa97d715ac27e9558ea73a1221925f589b (patch)
tree6b8130ffdda076d0396d69f9b3916d08a740fa13
parent08caf0900db680273bac419448f21fea4fe28499 (diff)
downloadbusybox-w32-89b3cbaa97d715ac27e9558ea73a1221925f589b.tar.gz
busybox-w32-89b3cbaa97d715ac27e9558ea73a1221925f589b.tar.bz2
busybox-w32-89b3cbaa97d715ac27e9558ea73a1221925f589b.zip
ash: clear sa_flags always
Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--shell/ash.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 11ba9774a..b50e0952e 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -3491,13 +3491,18 @@ setsignal(int signo)
3491 switch (new_act) { 3491 switch (new_act) {
3492 case S_CATCH: 3492 case S_CATCH:
3493 act.sa_handler = signal_handler; 3493 act.sa_handler = signal_handler;
3494 act.sa_flags = 0; /* matters only if !DFL and !IGN */
3495 sigfillset(&act.sa_mask); /* ditto */
3496 break; 3494 break;
3497 case S_IGN: 3495 case S_IGN:
3498 act.sa_handler = SIG_IGN; 3496 act.sa_handler = SIG_IGN;
3499 break; 3497 break;
3500 } 3498 }
3499
3500 /* flags and mask matter only if !DFL and !IGN, but we do it
3501 * for all cases for more deterministic behavior:
3502 */
3503 act.sa_flags = 0;
3504 sigfillset(&act.sa_mask);
3505
3501 sigaction_set(signo, &act); 3506 sigaction_set(signo, &act);
3502 3507
3503 *t = new_act; 3508 *t = new_act;