in reply to Re^3: Perl Daemons and SIGHUP
in thread Perl Daemons and SIGHUP

Hi everyone -

I am glad to announce that the problem is solved! Well, the reason the process died is bebcaus the exec call failed. And why is that? because the process tried to invoke the script by using the wrong path.

I will explain:
As you all surely know, once the process has been daemonized it runs under / directory (root directory). The process then tried to invoke the script by using relative path and not absolute path as it should have done.
This caused the exec call to fail and thus the process couldn't be restarted. By the way, once the process receives HUP signal it will eventually die anyway. To prevent this you can start it in the signal handler and thus a new process will be created along with this that died.

Thank you all for your help

  • Comment on Re^4: Perl Daemons and SIGHUP - FIXED!!!