Bug 98263 - killall send wrong signals due to bad option parsing
Summary: killall send wrong signals due to bad option parsing
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: psmisc
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-06-29 15:18 UTC by David Nečas
Modified: 2007-04-18 16:55 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2003-09-27 17:43:52 UTC
Embargoed:


Attachments (Terms of Use)
proposed patch (706 bytes, patch)
2003-06-29 15:20 UTC, David Nečas
no flags Details | Diff

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):
psmisc-21.2-4

How reproducible:
Always

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...


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