Bug 649814 - 'lsb_start_daemon' with '-p' option can't return
Summary: 'lsb_start_daemon' with '-p' option can't return
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: redhat-lsb
Version: 5.5
Hardware: x86_64
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Ondrej Vasik
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-11-04 15:57 UTC by Richard Ash
Modified: 2013-03-08 12:43 UTC (History)
6 users (show)

Fixed In Version: redhat-lsb-4.0-2.1.4.el5
Doc Type: Bug Fix
Doc Text:
Clone Of: 485367
Environment:
Last Closed: 2013-03-08 12:43:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
CentOS 0004575 0 None None None Never

Description Richard Ash 2010-11-04 15:57:45 UTC
+++ This bug was initially created as a clone of Bug #485367 +++
Using the LSB-mandated lsb_start_daemon shell function with the LSB-mandated -p option puts the code into an endless loop and never starts the daemon.

Reproducible: Always

Steps to Reproduce:
call start_daemon function in the init script like this,
----
. /lib/lsb/init-functions
start_daemon -p /var/run/${DAEMON}.pid /pathto/${DAEMON}
----

Actual Results:  
freeze. (causes infinite loop in shell code)

The reason is in /etc/redhat-lsb/lsb_start_daemon.
the while loop in lsb_start_daemon don't read "-p" option.
so it cause infinite loop.

according to LSB 3.2 and LSB3.1 spec, start_daemon accepts "-p" ottion.
<http://refspecs.linux-foundation.org/LSB_3.2.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html>
<http://refspecs.linux-foundation.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html>

This problem also affects Centos 5.5 (bug http://bugs.centos.org/view.php?id=4575) in the redhat-lsb-3.1 package.

--- Additional comment from jthomas on 2009-05-15 11:55:36 EDT ---

Created attachment 344190 [details]
lsb_start_daemon patch to fix up cases

ok, here's the last revision. I swear.

Comment 1 Richard Ash 2010-11-05 15:26:25 UTC
Applying the patch in the attachment fixes the problem for Centos 5.5.

Comment 2 Ondrej Vasik 2013-03-08 12:43:14 UTC
Closing CURRENTRELEASE, there should not be any deadlock in the recent redhat-lsb RHEL-5 packages. Package redhat-lsb-4.0-2.1.4.el5 (released in January 2011) and later packages should work just fine.


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