Bug 1396774 - kill command missing -q option
Summary: kill command missing -q option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: util-linux
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-20 00:57 UTC by Arun Chandrasekaran
Modified: 2016-12-01 10:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-01 10:02:49 UTC
Target Upstream Version:


Attachments (Terms of Use)

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)


Note You need to log in before you can comment on or make changes to this bug.