Bug 237149 - killproc returns wrong status code in case where service is already stopped
killproc returns wrong status code in case where service is already stopped
Status: CLOSED DUPLICATE of bug 151104
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
Brock Organ
http://refspecs.freestandards.org/LSB...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-19 14:04 EDT by Tarun Reddy
Modified: 2014-03-16 23:06 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-19 14:14:45 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tarun Reddy 2007-04-19 14:04:13 EDT
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):
initscripts-7.93.25.EL

How reproducible:
Always

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 14:14:45 EDT
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.