[Toybox] The "kill" command.

Eduardo Tongson propolice at gmail.com
Wed Feb 22 07:27:18 PST 2012


On Wed, Feb 22, 2012 at 1:11 PM, Rob Landley <rob at landley.net> wrote:
> The standard here is unintelligible:
>
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/kill.html
>
>> If an exit_status operand is given and it is a value of the '?' shell
>> special parameter (see Special Parameters and wait) corresponding to
>> a process that was terminated by a signal, the signal_name
>> corresponding to the signal that terminated the process shall be
>> written
>
> So if I run "false" then $? is 1, and somehow "kill -l 1" is supposed to
> retroactively associate that 1 with a process ID that no longer exists...?
>
> What?
>
> (It _seems_ that what -l is doing is in ubuntu's implementation is
> converting a signal number to name or vice versa.  How you get that from
> the above standard snippet, I can't even _guess_...)
>
> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net

That is if you take the exit status of wait(). See the manpage of wait.

$ sleep 500&
[1] 26975
$ kill -9 26975
$ wait 26975
$ kill -l $?
KILL

 1329924438.0


More information about the Toybox mailing list