aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;