Bug 245766 - Function killproc doesn't work the way it does in RHEL4
Summary: Function killproc doesn't work the way it does in RHEL4
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts   
(Show other bugs)
Version: 5.0
Hardware: i386 Linux
low
medium
Target Milestone: ---
: ---
Assignee: initscripts Maintenance Team
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-06-26 15:21 UTC by Dirk
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-06-26 15:37:34 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Dirk 2007-06-26 15:21:54 UTC
Description of problem:

Hello,

I have a big Problem with a chrooted Version of the included Apache, the Problem
is that i can't restart the service via service httpd restart when it is chrooted.

This occurs because redhat changes the behaviour of the FIND PID Part in
/etc/init.d/functions from:
 if [ -z "$pid" ]; then
                pid=`pidof -o $$ -o $PPID -o %PPID -x $1 || \
                        pidof -o $$ -o $PPID -o %PPID -x $base`

to:
__pids_pidof() {
      pidof -c -o $$ -o $PPID -o %PPID -x "$1" || \
              pidof -c -o $$ -o $PPID -o %PPID -x "${1##*/}"

}

The Problematical Part seems to be the -c option because this causes not
regognicing my chrooted Apache


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

Apache Version 2.2.3-6.el5
ModSecurity 2.1-1.4 ( I know this is not supported by redhat but i think the
problem is more genereal as described before)

How reproducible:

Everytime via service httpd restart
FAILED

Expected results:

SUCCESS

Comment 1 Dirk 2007-06-26 15:24:41 UTC
Can I just remove the -c Option or does this destroy other import functionality,
and when not can you "correct" this in a future release ? Kind Regards Dirk 

Comment 2 Bill Nottingham 2007-06-26 15:37:34 UTC
This is an intentional change, dating back to 2005; the idea is to avoid
unintentionally killing processes in a different chroot. The simple workaround
is to run the command in the chroot.

Reverting this would break requested behavior.

Comment 3 Dirk 2007-06-27 07:59:21 UTC
Hello,

This may bye right, but my problem ist, that if i completely want to run this
comand in chroot environment i have to build a completely chroot which i normaly
not need for mod_security as i not need librarys and sh for example because
mod_security is so clever to chrooting just after loading libraries. 


So wouldn't it be possible to establish an switch in the init script wheater it
uses the old or the new behavior.

Kind regards
Dirk 

Comment 4 Bill Nottingham 2007-06-27 13:32:25 UTC
At that point, I'm not sure what you gain over running just 'killall <process>',
esepcially if you're going to have to edit config files for each script.


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