libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_set
signal_SA_RESTART_empty_mask - 65 +65 signal_no_SA_RESTART_empty_mask - 54 +54 dd_main 1325 1369 +44 sigaction_set - 19 +19 dname_enc 373 377 +4 UNSPEC_print 64 66 +2 setsignal 296 294 -2 bb_signals_recursive 95 92 -3 bb_askpass 367 361 -6 inetd_main 1810 1797 -13 rx_main 912 883 -29 sigdelset 32 - -32 __sigdelset 32 - -32 __GI_sigdelset 32 - -32 sighup_handler 84 37 -47 arping_main 1844 1797 -47 fsck_main 1869 1807 -62 run_list 1917 1844 -73 vlock_main 492 409 -83 progressmeter 883 798 -85 handle_incoming_and_exit 2737 2651 -86 ------------------------------------------------------------------------------ (add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632) Total: -444 bytes
This commit is contained in:
12
shell/hush.c
12
shell/hush.c
@ -699,16 +699,6 @@ static const struct built_in_command bltins[] = {
|
||||
|
||||
#if ENABLE_HUSH_JOB
|
||||
|
||||
/* move to libbb? */
|
||||
static void signal_SA_RESTART(int sig, void (*handler)(int))
|
||||
{
|
||||
struct sigaction sa;
|
||||
sa.sa_handler = handler;
|
||||
sa.sa_flags = SA_RESTART;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(sig, &sa, NULL);
|
||||
}
|
||||
|
||||
/* Signals are grouped, we handle them in batches */
|
||||
static void set_fatal_sighandler(void (*handler)(int))
|
||||
{
|
||||
@ -2115,7 +2105,7 @@ static int run_list(struct pipe *pi)
|
||||
#if ENABLE_FEATURE_SH_STANDALONE
|
||||
nofork_save.saved = 0; /* in case we will run a nofork later */
|
||||
#endif
|
||||
signal_SA_RESTART(SIGTSTP, handler_ctrl_z);
|
||||
signal_SA_RESTART_empty_mask(SIGTSTP, handler_ctrl_z);
|
||||
signal(SIGINT, handler_ctrl_c);
|
||||
}
|
||||
#endif /* JOB */
|
||||
|
Reference in New Issue
Block a user