I think it would be better to connect to the listening socket and issue a specific command than to kill the working thread. You might kill it at a wrong time.
If you want to be safe you may for example generate a random number before the fork() and then include the number in the stop command. If you then accept stop requests only from localhost and only if they contain the right number you should be fairly safe.
Jenda
| XML sucks. Badly. SOAP on the other hand is the most powerfull vacuum pump ever invented. |
In reply to Re^3: Win32::Daemon + socket->accept: service cannot be stopped
by Jenda
in thread Win32::Daemon + socket->accept: service cannot be stopped [SOLVED]
by svenXY
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |