Bug 1396774

Summary: kill command missing -q option
Product: Red Hat Enterprise Linux 7 Reporter: Arun Chandrasekaran <aruncxy>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: lpol
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-01 10:02:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Arun Chandrasekaran 2016-11-20 00:57:20 UTC
Description of problem:

man 1 kill shows -q option (Use  sigqueue(2)  rather  than kill(2) and the sigval argument is used to specify an integer to be sent with the signal.). But when executed, kill doesn't accept -q.

It is miss leading when the man page shows something and the behavior is something else.

Version-Release number of selected component (if applicable):


How reproducible:
This is a packaging issue, so it is 100% reproducible.


Actual results:

Executing only `kill` shows the usage, which doesn't contain -q option.

~/$ kill
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]


Expected results:

Executing only `kill` shows the usage, which doesn't contain -q option.

~/$ kill
kill: usage: kill [-s sigspec | -n signum | -sigspec | -q sigval] pid | jobspec ... or kill -l [sigspec]

Comment 2 Arun Chandrasekaran 2016-11-21 18:18:57 UTC
Looks like HAVE_SIGQUEUE is never set to 1 anywhere in util-linux.

21-11-2016 10:09:38 arun-desk-r7 ~/code/personal/util-linux-2.29
$ grep HAVE_SIGQUEUE -rw . -n                                   
./config.h.in:395:#undef HAVE_SIGQUEUE                          
./misc-utils/kill.c:74:#ifdef HAVE_SIGQUEUE                     
./misc-utils/kill.c:311:#ifdef HAVE_SIGQUEUE                    
./misc-utils/kill.c:388:#ifdef HAVE_SIGQUEUE                    
./misc-utils/kill.c:406:#ifdef HAVE_SIGQUEUE                    
./misc-utils/kill.c:453:#ifdef HAVE_SIGQUEUE                    
21-11-2016 10:09:44 arun-desk-r7 ~/code/personal/util-linux-2.29

Comment 3 Karel Zak 2016-12-01 10:02:49 UTC
> ~/$ kill
> kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill > -l [sigspec]

It seems like you're talking about shell built-in kill command rather than about util-linux kill binary, try

  /usr/bin/kill --help

and it works for me:

# strace /usr/bin/kill --queue 123 --signal ALRM 31622
...
rt_sigqueueinfo(31622, SIGALRM, {si_signo=SIGALRM, si_code=SI_QUEUE, si_pid=31630, si_uid=0, si_value={int=123, ptr=0x7b00000000}}) = 0
...

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)