mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-27 21:50:32 +00:00
ash: clear sa_flags always
Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
08caf0900d
commit
89b3cbaa97
@ -3491,13 +3491,18 @@ setsignal(int signo)
|
|||||||
switch (new_act) {
|
switch (new_act) {
|
||||||
case S_CATCH:
|
case S_CATCH:
|
||||||
act.sa_handler = signal_handler;
|
act.sa_handler = signal_handler;
|
||||||
act.sa_flags = 0; /* matters only if !DFL and !IGN */
|
|
||||||
sigfillset(&act.sa_mask); /* ditto */
|
|
||||||
break;
|
break;
|
||||||
case S_IGN:
|
case S_IGN:
|
||||||
act.sa_handler = SIG_IGN;
|
act.sa_handler = SIG_IGN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* flags and mask matter only if !DFL and !IGN, but we do it
|
||||||
|
* for all cases for more deterministic behavior:
|
||||||
|
*/
|
||||||
|
act.sa_flags = 0;
|
||||||
|
sigfillset(&act.sa_mask);
|
||||||
|
|
||||||
sigaction_set(signo, &act);
|
sigaction_set(signo, &act);
|
||||||
|
|
||||||
*t = new_act;
|
*t = new_act;
|
||||||
|
Loading…
Reference in New Issue
Block a user