+++ 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.
Applying the patch in the attachment fixes the problem for Centos 5.5.
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.