Bug 98263

Summary: killall send wrong signals due to bad option parsing
Product: [Retired] Red Hat Linux Reporter: David Nečas <yeti>
Component: psmiscAssignee: Mike A. Harris <mharris>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-09-27 17:43:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
proposed patch none

Description David Nečas 2003-06-29 15:18:57 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.10 (X11; Linux i686; U;) Gecko/20030314

Description of problem:
The -S option makes impossible to pass -SEGV, -STOP, -STKFLT, and -SYS as
signals on the command line. The -S option exists only with FLASK_LINUX defined
(which is not the case of RedHat Linux), but the list of short options given to
getopt_long() includes is always.

The net result is that trying to send any of these signals makes killall to send
a SIGTERM instead of the specified signal.

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

How reproducible:

Steps to Reproduce:
1. Create do_nothing.c:

int main(void) { while (1) ; }

compile it:

make do_nothing

2. Run it in the background in bash

./do_nothing &

3. Run

killall -STOP do_nothing

4. Press Enter

Actual Results:
[1]+  Terminated              ./do_nothing

Expected Results:
[1]+  Stopped                 ./do_nothing

Additional info:

A patch is proposed. It fixes it w/o FLASK_LINUX -- with FLASK_LINUX it can be
reasonably fixed only by renaming the -S option to something sane.

Comment 1 David Nečas 2003-06-29 15:20:33 UTC
Created attachment 92678 [details]
proposed patch

Comment 3 David Nečas 2003-09-27 17:43:52 UTC
The bug was fixed in upstream psmisc-21.3, included in RawHide/Severn. Thus I'm
closing it. Thanks for cooperation...