aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-03-12 23:19:35 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-03-12 23:19:35 +0000
commit8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21 (patch)
treecf328e6b8bbdc608228da528f661124e364edb85 /miscutils
parent4cf1d08fc2e50f9abda999d468c5e972ff4995c2 (diff)
downloadbusybox-8e2cfec1cdf34068f2378aae9fe8f5ec0f821e21.tar.gz
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 'miscutils')
-rw-r--r--miscutils/devfsd.c4
-rw-r--r--miscutils/rx.c5
2 files changed, 3 insertions, 6 deletions
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c
index 50c8203cb..1b88f050e 100644
--- a/miscutils/devfsd.c
+++ b/miscutils/devfsd.c
@@ -390,8 +390,8 @@ int devfsd_main(int argc, char **argv)
sigemptyset(&new_action.sa_mask);
new_action.sa_flags = 0;
new_action.sa_handler = signal_handler;
- sigaction(SIGHUP, &new_action, NULL);
- sigaction(SIGUSR1, &new_action, NULL);
+ sigaction_set(SIGHUP, &new_action);
+ sigaction_set(SIGUSR1, &new_action);
printf("%s v%s started for %s\n", applet_name, DEVFSD_VERSION, mount_point);
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 9a8fcaa20..48867b83c 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -220,7 +220,6 @@ static void sigalrm_handler(int ATTRIBUTE_UNUSED signum)
int rx_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
int rx_main(int argc, char **argv)
{
- struct sigaction act;
struct termios tty, orig_tty;
int termios_err;
int file_fd;
@@ -243,9 +242,7 @@ int rx_main(int argc, char **argv)
}
/* No SA_RESTART: we want ALRM to interrupt read() */
- memset(&act, 0, sizeof(act));
- act.sa_handler = sigalrm_handler;
- sigaction(SIGALRM, &act, NULL);
+ signal_no_SA_RESTART_empty_mask(SIGALRM, sigalrm_handler);
n = receive(file_fd);