Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 237149 - killproc returns wrong status code in case where service is already stopped
Summary: killproc returns wrong status code in case where service is already stopped
Status: CLOSED DUPLICATE of bug 151104
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts
Version: 4.4
Hardware: All
OS: Linux
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL: http://refspecs.freestandards.org/LSB...
Depends On:
TreeView+ depends on / blocked
Reported: 2007-04-19 18:04 UTC by Tarun Reddy
Modified: 2014-03-17 03:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-19 18:14:45 UTC
Target Upstream Version:

Attachments (Terms of Use)

Description Tarun Reddy 2007-04-19 18:04:13 UTC
Description of problem:
When doing an /etc/init.d/<service> stop on a stopped service, the script
returns incorrectly $?=1 instead of the correct 0 (per LSB in URL). This is
changed in RHEL5 to the correct behavior.

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

How reproducible:

Steps to Reproduce:
1./etc/init.d/httpd start  (returns 0)
2./etc/init.d/httpd stop   (returns 0)
3./etc/init.d/httpd stop   (returns 1!)
Actual results:
echo $? returns 1

Expected results:
echo $? should return 0

Additional info:
This causes issues in a clustered environment such as RHCS where the cluster
manager tries to stop the service and gets a failed error code and refuses to
continue. You must manually bring up the service (so that the stop returns a 0)
before being able to re-enable the clustered service.

Comment 1 Bill Nottingham 2007-04-19 18:14:45 UTC
Correct. However, this is a behavior change that could affect existing scripts,
so the decision was made to not change this for RHEL 4.

*** This bug has been marked as a duplicate of 151104 ***

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