aboutsummaryrefslogtreecommitdiff
path: root/libbb/u_signal_names.c
AgeCommit message (Collapse)Author
2018-10-31libbb/u_signal_names.c: don't check errno after bb_strtouRasmus Villemoes
Since we're comparing the return value to a smallish integer anyway, we might as well use that bb_strtou() returns UINT_MAX for malformed input. Referencing errno is kinda bloaty on glibc. While NSIG is not in POSIX, we do already rely on it being defined, compile-time const and smallish, since arrays in struct globals_misc are defined in terms of it. function old new delta get_signum 312 286 -26 Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-10-31libbb: optionally honour libc provided SIGRTMIN/SIGRTMAX in get_signum()Rasmus Villemoes
When an application documents that it responds such and such to SIGRTMIN+n, that almost always means with respect to the libc-provided SIGRTMIN. Hence I disagree with the "more correct" in commit 7b276fc17594. In any case, this is rather unfortunate: 36 34 (the first shell is bash). We probably can't change default behaviour after 7 years, but at least we can provide a config option. We avoid a little code generation (repeated calls to __libc_current_sigrtmin) by stashing SIGRTMIN/SIGRTMAX in local variables, but it does cost ~50 bytes. The next patch serves as penance for that. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-09-18regularize format of source file headers, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-25ash: allow "trap NUM [SIG]..." syntaxDenys Vlasenko
While at it, make get_signum() return -1 for numeric strings >= NSIG. function old new delta trapcmd 292 306 +14 get_signum 295 300 +5 builtin_trap 413 412 -1 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 19/-1) Total: 18 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21config: deindent all help textsDenys Vlasenko
Those two spaces after tab have no effect, and always a nuisance when editing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-22*: slap on a few ALIGN1/2s where appropriateDenys Vlasenko
The result of looking at "grep -F -B2 '*fill*' busybox_unstripped.map" text data bss dec hex filename 829901 4086 1904 835891 cc133 busybox_before 829665 4086 1904 835655 cc047 busybox Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-03kill[all[5]],pkill: make signal list show signal numbers, and show RTMIN/MAXDenys Vlasenko
function old new delta print_signames 31 64 +33 signals 224 231 +7 Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-03kill[all[5]],pkill: more correct, and smaller, SIGRTMIN/MAX codeDenys Vlasenko
function old new delta __libc_current_sigrtmin 6 - -6 __libc_current_sigrtmax 6 - -6 get_signum 339 295 -44 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 0/1 up/down: 0/-56) Total: -56 bytes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-12-30libbb: optionally support RTMIN[+n] and RTMAX[-n] signal namesDenys Vlasenko
function old new delta get_signum 140 336 +196 __libc_allocate_rtsig - 56 +56 __libc_current_sigrtmin - 6 +6 __libc_current_sigrtmax - 6 +6 current_rtmin - 4 +4 current_rtmax - 4 +4 bbconfig_config_bz2 4961 4962 +1 ------------------------------------------------------------------------------ (add/remove: 6/0 grow/shrink: 2/0 up/down: 273/0) Total: 273 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2008-06-27*: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
2008-05-15more of -Wall fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko
Some are fixing real bugs. function old new delta syslogd_main 938 958 +20 get_signum 136 143 +7 obj_load 777 782 +5 recv_from_to 210 214 +4 get_next_block 1795 1799 +4 display_topmem_process_list 1117 1121 +4 logread_main 484 487 +3 buffer_fill_and_print 73 76 +3 kill_main 687 689 +2 ll_remember_index 240 241 +1 do_stats 452 453 +1 if_readconf 166 165 -1 display_process_list 1192 1191 -1 run_applet_and_exit 507 505 -2 print_signames 33 31 -2 parse_one_line 1092 1090 -2 find_out_spec 57 55 -2 add_ksymoops_symbols 421 419 -2 ash_main 1407 1402 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
2008-05-13more -Wall warning fixes from Cristian Ionescu-Idbohrn.Denis Vlasenko
This time it resulted in small code changes: function old new delta nexpr 820 828 +8 tail_main 1200 1202 +2 wrapf 166 167 +1 parse_mount_options 227 209 -18 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
2007-12-04signal names hack was wrong, it broke "get signal name" function.Denis Vlasenko
Reverting :(
2007-12-04Make signal table a bit smallerDenis Vlasenko
get_signum 136 151 +15 signals 224 192 -32
2007-12-04guard against SIGxxx >= 32 (no code changes on i386)Denis Vlasenko
2007-09-30print_signames_and_exit -> print_signames (because of "ash calls kill_main")Denis Vlasenko
2007-09-29pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>Denis Vlasenko
2007-06-25Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ↵Denis Vlasenko
<wharms@bfs.de>)
2007-05-01test: code size saving, no logic changesDenis Vlasenko
ps: fix warning, make a bit smaller kill -l: make smaller & know much more signals function old new delta get_signum 121 153 +32 kill_main 826 843 +17 get_signame 44 36 -8 signals 252 224 -28 .rodata 131955 131923 -32 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/3 up/down: 49/-68) Total: -19 bytes
2007-03-14stop using (yet another) static bufferDenis Vlasenko
2006-12-23fix recognitions of -SIGname signalsDenis Vlasenko
(fix by Jacques LUDER <jacques.luder@thalesgroup.com>)
2006-12-04- cosmetic change to avoid warnings about eventual padding/packing.Bernhard Reutner-Fischer
2006-09-27kill: fix bugs (kill -l output was horrible), fix style, constify dataDenis Vlasenko
2006-09-17whitespace cleanupDenis Vlasenko
2006-07-12A couple things that got tangled up in my tree, easier to check in both thanRob Landley
untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree.
2006-05-19- include strings.hBernhard Reutner-Fischer
Thanks to Rich Felker for pointing this out.
2006-04-03- move buffer allocation schemes to libbb.hBernhard Reutner-Fischer
- include the correct headers: applets need busybox.h while lib* need libbb.h
2004-03-15Remove trailing whitespace. Update copyright to include 2004.Eric Andersen
2003-07-14Update a bunch of docs. Run a script to update my email addr.Eric Andersen
2001-10-24Major rework of the directory structure and the entire build system.Eric Andersen
-Erik
2001-08-02Oops. I forgot to commit this part of vodz' patch.Eric Andersen