diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 23:19:35 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 23:19:35 +0000 |
| commit | 8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21 (patch) | |
| tree | cf328e6b8bbdc608228da528f661124e364edb85 /shell | |
| parent | 4cf1d08fc2e50f9abda999d468c5e972ff4995c2 (diff) | |
| download | busybox-w32-8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21.tar.gz busybox-w32-8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21.tar.bz2 busybox-w32-8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21.zip | |
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
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 2 | ||||
| -rw-r--r-- | shell/hush.c | 12 |
2 files changed, 2 insertions, 12 deletions
diff --git a/shell/ash.c b/shell/ash.c index 9b1a73024..6f675ce69 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -3340,7 +3340,7 @@ setsignal(int signo) | |||
| 3340 | *t = action; | 3340 | *t = action; |
| 3341 | act.sa_flags = 0; | 3341 | act.sa_flags = 0; |
| 3342 | sigfillset(&act.sa_mask); | 3342 | sigfillset(&act.sa_mask); |
| 3343 | sigaction(signo, &act, NULL); | 3343 | sigaction_set(signo, &act); |
| 3344 | } | 3344 | } |
| 3345 | 3345 | ||
| 3346 | /* mode flags for set_curjob */ | 3346 | /* mode flags for set_curjob */ |
diff --git a/shell/hush.c b/shell/hush.c index b44f35bdd..baa2db780 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
| @@ -699,16 +699,6 @@ static const struct built_in_command bltins[] = { | |||
| 699 | 699 | ||
| 700 | #if ENABLE_HUSH_JOB | 700 | #if ENABLE_HUSH_JOB |
| 701 | 701 | ||
| 702 | /* move to libbb? */ | ||
| 703 | static void signal_SA_RESTART(int sig, void (*handler)(int)) | ||
| 704 | { | ||
| 705 | struct sigaction sa; | ||
| 706 | sa.sa_handler = handler; | ||
| 707 | sa.sa_flags = SA_RESTART; | ||
| 708 | sigemptyset(&sa.sa_mask); | ||
| 709 | sigaction(sig, &sa, NULL); | ||
| 710 | } | ||
| 711 | |||
| 712 | /* Signals are grouped, we handle them in batches */ | 702 | /* Signals are grouped, we handle them in batches */ |
| 713 | static void set_fatal_sighandler(void (*handler)(int)) | 703 | static void set_fatal_sighandler(void (*handler)(int)) |
| 714 | { | 704 | { |
| @@ -2115,7 +2105,7 @@ static int run_list(struct pipe *pi) | |||
| 2115 | #if ENABLE_FEATURE_SH_STANDALONE | 2105 | #if ENABLE_FEATURE_SH_STANDALONE |
| 2116 | nofork_save.saved = 0; /* in case we will run a nofork later */ | 2106 | nofork_save.saved = 0; /* in case we will run a nofork later */ |
| 2117 | #endif | 2107 | #endif |
| 2118 | signal_SA_RESTART(SIGTSTP, handler_ctrl_z); | 2108 | signal_SA_RESTART_empty_mask(SIGTSTP, handler_ctrl_z); |
| 2119 | signal(SIGINT, handler_ctrl_c); | 2109 | signal(SIGINT, handler_ctrl_c); |
| 2120 | } | 2110 | } |
| 2121 | #endif /* JOB */ | 2111 | #endif /* JOB */ |
