in reply to My daemon will not restart
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: My daemon will not restart
by pc88mxer (Vicar) on Feb 14, 2008 at 17:54 UTC | |
by graq (Curate) on Feb 15, 2008 at 09:15 UTC |