An initial revision of "kill -l [exitstatus]"
Denis Vlasenko
vda.linux at googlemail.com
Sun Apr 29 14:35:30 UTC 2007
On Saturday 28 April 2007 15:42, Mats Erik Andersson wrote:
> Hi there,
>
> let me return to the subject of "kill -l", as it is present
> in an ash builtin and as an applet. Luciano M. F. Rocha had
> an important point earlier on, when observing that the ash
> builtin command must supply a functionality "kill -9 %1",
> which the applet "kill" can never do. Therefore I have as a
> first step, in response to Denis Vlasenko's challenge to
> integrate the two kill commands into a single code,
> concentrated on a partial task:
>
> 1) Make a shared code for "kill -l [exitstatus]".
>
> 2) Conform to all parts of SUSv3 for "kill -l [exitstatus]"
I was thinking of making shared code for entire kill,
not just kill -l. This way we can save much more on code size.
I am attaching my proposal. Please test & report whereever I goof up
(a lot of subtle error cases there - kill_main must be very careful now
to not exit, but return to caller!)
size stats:
# make bloatcheck
function old new delta
evaltreenr 644 654 +10
evaltree 644 654 +10
parse_conf 1440 1444 +4
dpkg_deb_main 426 429 +3
ed_main 3319 3321 +2
passwd_main 2093 2091 -2
kill_main 830 826 -4
singlemount 4609 4601 -8
find_command 962 954 -8
get_lcm 123 105 -18
.rodata 132243 132147 -96
killcmd 449 120 -329
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/7 up/down: 29/-465) Total: -436 bytes
(Whee, as usual when I touch a .h file, gcc magically compiles
unrelated stuff differently. Oh well...)
# size busybox_old busybox_unstripped
text data bss dec hex filename
723901 2940 27504 754345 b82a9 busybox_old
723457 2940 27504 753901 b80ed busybox_unstripped
--
vda
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1.patch
Type: text/x-diff
Size: 9099 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20070429/8d35a940/attachment-0002.bin
More information about the busybox
mailing list