Red Hat Bugzilla – Bug 130629
initlog returns spurious error status when starting certain daemons
Last modified: 2014-03-16 22:47:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
Description of problem:
While crafting init scripts for gpsd-2, I found that initlog
consistently returns a spurious nonzero status when starting up
gpsd. The result is that the daemon function displays a FAILED
indication even though daemon startup was successful.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Download and build gpsd from http://gpsd.berlios.de/
2. Run "initlog -q -c 'qpsd'; echo $?" as root.
3. Observe that the return status is nonzero.
4. Verify with ps ax that gpsd is running
Actual Results: The daemon function spuriously indicated failure.
Expected Results: A big green SUCCEEDED.
I am almost certain this symptom is related to bug #67232. gpsd
forks itself after it starts up. I compiled initscripts from
current CVS HEAD, went in with gdb, and verified that the problem does
indeed appear to be in the waitpid() call in monitor().
Fix the damn SIGCHLD problem already. Alan Cox diagnosed this one
two years ago.
Can't reproduce this on a current release. Note that initlog is deprecated and
will be removed from future releases.