Bug 815674 - unable to signal process group
unable to signal process group
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Red Hat Kernel Manager
Red Hat Kernel QE team
:
Depends On:
Blocks: 810583
  Show dependency treegraph
 
Reported: 2012-04-24 04:35 EDT by Peter Hatina
Modified: 2016-05-31 21:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-05-03 05:12:30 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Usage example in C (333 bytes, text/x-csrc)
2012-04-24 09:29 EDT, Peter Hatina
no flags Details

  None (edit)
Description Peter Hatina 2012-04-24 04:35:33 EDT
Description of problem:
I am not able to signal a group of processes. Wrt kill(1), by specifying negative PID, kill should send signal to the process group.

Version-Release number of selected component (if applicable):
util-linux-ng-2.17.2-12.4.el6.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. create a process group (parent, several children)
2. kill -s SIGTERM -- -PID_OF_PARENT
  
Actual results:
bash: kill: (-PID_OF_PARENT) - No such process

Expected results:
Process group should have been signalled.
Comment 2 Peter Hatina 2012-04-24 09:29:06 EDT
Created attachment 579856 [details]
Usage example in C

The program should signal a process group by the signal specified in the first argument.

Actual result is: kill: No such process

Same, as /bin/kill.
Comment 3 Peter Hatina 2012-04-25 09:23:09 EDT
Kernel used: 2.6.32-232.el6.x86_64
Comment 4 Oleg Nesterov 2012-04-30 08:33:57 EDT
(In reply to comment #2)
>
> Created attachment 579856 [details]

this test-case can't demonstrate the bug, it simply does sys_kill().

> The program should signal a process group by the signal specified in the first
> argument.

Yes, but pgid should be correct.

> Actual result is: kill: No such process
> 
> Same, as /bin/kill.

I do not have the testing machine with rhel right now, but I simply
can't believe it has the bug like this ;) I bet it would have been
noticed a long ago.

Could you please double check? Or could you provide the "complete"
test-case? Or, simply, could you show how did you verify that
kill -pgid doesn't work?

Or. could you try the simplest test-case:

    $ perl -wle '$SIG{CONT}=sub{print $$}; fork ? wait : kill "CONT", -getppid'

on my machine the output is:

    5398
    5399

which shows that kill -pgid works correctly.
Comment 5 Peter Hatina 2012-05-03 05:12:30 EDT
Oleg, thank you for your reply. The problem was in misunderstanding of the process group.

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