Bug 98263 - killall send wrong signals due to bad option parsing
Summary: killall send wrong signals due to bad option parsing
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: psmisc   
(Show other bugs)
Version: 9
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact:
Depends On:
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:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-09-27 17:43:52 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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):

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

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