The "kill" command is often a shell builtin, which can confuse people because it may work differently on different systems; not because of the OS per se but rather because of the specific shell or its lineage.
In this specific case, the original poster wanted to capture exit status using kill -l. Specifically, he wanted to know what signal had terminated his process. He gave examples of using kill -l on SCO Unix, Linux, and Sunos, but the real issue was the shell - the built in shell "kill" was different (as it often is)..
Note that "man kill" is not necessarily the same as (for instance) doing "man bash" and skipping down to the section that describes the built-in kill. If you specifically want /bin/kill, just call it that way.
At the OS level, there is, of course, a kill function, and on some systems a specific "raise" function that allows a process to send a signal to itself.
The "killall" command is handy on Linux, Solaris, and BSD, but can be dangerous in other places: Killall doesn't work!
If you found something useful today, please consider a small donation.
Got something to add? Send me email.
More Articles by Tony Lawrence © 2011-03-28 Tony Lawrence
By understanding a machine-oriented language, the programmer will tend to use a much more efficient method; it is much closer to reality. (Donald Knuth)