kill -L does not work

Bug #23647 reported by Antonio
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Invalid
Low
Unassigned
Declined for Lucid by Scott James Remnant (Canonical)

Bug Description

man kill report that:

     kill -L List the available signal choices in a nice table.

but kill -L report this error:

netbix@ubuntunet:~$ kill -L
bash: kill: L: invalid signal specification
netbix@ubuntunet:~$

Revision history for this message
Dennis Kaarsemaker (dennis) wrote :

This is merely an error in the manpage. kill -l without further arguments gives
you the list.

Revision history for this message
Vassilis Pandis (pandisv) wrote :

Still present.

Changed in procps:
status: Unconfirmed → Confirmed
Revision history for this message
Pete Savage (petesavage) wrote :

This is not actually a bug in the binary. In fact if you run the command /bin/kill -L you will get the following

(mychroot)pete@ubuntu:~/procps$ /bin/kill -L
 1 HUP 2 INT 3 QUIT 4 ILL 5 TRAP 6 ABRT 7 BUS
 8 FPE 9 KILL 10 USR1 11 SEGV 12 USR2 13 PIPE 14 ALRM
15 TERM 16 STKFLT 17 CHLD 18 CONT 19 STOP 20 TSTP 21 TTIN
22 TTOU 23 URG 24 XCPU 25 XFSZ 26 VTALRM 27 PROF 28 WINCH
29 POLL 30 PWR 31 SYS

The problem is that there is a built in kill command to bash. Installing procps does not override this. Is this the desired action, or would people like the procps binary to take over the kill control?

Pete Savage (petesavage)
Changed in procps:
status: Confirmed → Rejected
Revision history for this message
ropers (ropers) wrote :

Just encountered this bug as well. Here are my two eurocents:

The fact that '/bin/kill -L' *does* work as documented in 'man 1 kill' but 'kill' (ie. bash built-in kill) *does not* is an inconsistency. Inconsistencies should be avoided. IMHO this could be fixed EITHER by:

- removing the 'kill -L' info from the 'man 1 kill' manpage *AND* removing the 'kill -L' functionality from /bin/kill
  OR by
- implementing the 'kill -L' functionality in bash *AND* adding the 'kill -L' info to the 'SHELL BUILTIN COMMANDS' section of the 'man 1 bash' manpage.

I do realise that technically the present state of affairs is not a bug, and technically both (bash built-in) 'kill' and '/bin/kill' work as documented on their respective manpages. However, I feel that the different behaviour of '/bin/kill' and 'kill' still constitutes an inconsistency that is likely to entrap unwary users. I feel that not fixing this inconsistency on the aforesaid technical grounds would be a lame copout and not quite in tune with the philosophy and mission of Ubuntu Linux (or GNU/Linux. Whatever.).

As an aside, am I the only guy who finds that bash(1) monster manpage thoroughly inconvenient, and who finds it difficult to grep the correct part of that page when looking for documentation of a specific built-in command?

All that said, I can't code, and you're under no obligation to do as I wish. If you like the above and want to do something about it, great. If not, that's also quite fine. Your call.

Revision history for this message
ski (skibrianski) wrote :

Just got thrown for a loop by this. I think the proper fix is a CAVEAT section in the man page for kill indicating that shells typically override kill with a builtin. Since this is true for both dash and bash, the shells we ship by default, this seems like the least we can do. I'll try to write up a patch soon.

Revision history for this message
ski (skibrianski) wrote :

man page fix nominated for lucid.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Declined.

The manual page *already has* the following text:

NOTES
       Your shell (command line interpreter) may have a built-in kill command.
       You may need to run the command described here as /bin/kill to solve
       the conflict.

Revision history for this message
ski (skibrianski) wrote :

Yikes, so it does! Egg on my face.

I would still suggest something to make things a bit more clear. Specifically, let's explicitly include the place where the binaries live in SYNOPSIS section of the manpage, since both dash and bash are subject to this confusion. The below does just this - the implementation would require adding sed to build_deps, but that would be easy to remove if it's deemed worthwhile.

A similar hack could be used on other utilities that have corresponding builtins in bash - /usr/bin/time comes to mind.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.