Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a daemon called mydaemon.bin and a shell script called start-my-daemon.sh that sets some environment variables and then starts mydaemon.bin, which in turn calls the unix function daemon to daemonize itself and then creates a pidfile in $PIDFILE.

To start the daemon under Suse 10.0 I've written an init script that uses start_daemon -p $PIDFILE mydaemon.bin, however in 9 of 10 cases start_daemon returns with exit code 7 although the daemon started successfully. Even pidof proc does return the right pid. In case #10 it returns 0 as it should.

Any hints?

share|improve this question
Exit code 7 means Program is not running. Are there hints in syslog? – ott-- May 2 at 23:52
The program is running, even if it fails with exit code 7. – Panke May 3 at 9:07
Try to get closer with strace -fv start_daemon ... (insert program and args). – ott-- May 3 at 14:37

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.