Do you close the open socket in your sub release_the_pid_file()? (Not shown in the source you provide)(Update:Just noticed that this is a sub of Proc::PID_File)
You're not closing the open socket. The system may not yet have disassociated the open socket with your old process, and the new one will be unable to bind to it (you can't have two processes listening to the same TCP port). The subsequent die "Failed to restart daemon" will never be reached because it's after the exec.
In reply to Re: My daemon will not restart
by tirwhan
in thread My daemon will not restart
by graq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |