From 08ea11ab0749a7977e6d47cd0fa7b3c9cc10af32 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Thu, 11 Sep 2008 19:51:11 +0000 Subject: runsvd: shrink by Vladimir *: use unified trivial signal handler function old new delta record_signo - 10 +10 process_stdin 433 443 +10 bbunpack 383 391 +8 wc_main 598 605 +7 conescape 293 296 +3 nmeter_main 670 672 +2 fallbackSort 1717 1719 +2 bb_got_signal - 1 +1 microcom_main 713 712 -1 signalled 2 - -2 pack_gzip 1661 1659 -2 evalvar 1376 1374 -2 compare_keys 737 735 -2 parse_command 1460 1456 -4 expand 1748 1744 -4 s_term 37 29 -8 s_hangup 8 - -8 fgotsig 10 - -10 find_pair 187 169 -18 signal_handler 190 170 -20 runsvdir_main 1701 1583 -118 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 6/10 up/down: 43/-199) Total: -156 bytes --- include/libbb.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 388e2f9ef..34c7e417b 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -373,6 +373,9 @@ void sig_unblock(int sig) FAST_FUNC; int sigaction_set(int sig, const struct sigaction *act) FAST_FUNC; /* SIG_BLOCK/SIG_UNBLOCK all signals: */ int sigprocmask_allsigs(int how) FAST_FUNC; +/* Standard handler which just records signo */ +extern smallint bb_got_signal; +void record_signo(int signo); /* not FAST_FUNC! */ void xsetgid(gid_t gid) FAST_FUNC; -- cgit v1.2.3