in reply to Re^2: Win32::Daemon + socket->accept: service cannot be stopped
in thread Win32::Daemon + socket->accept: service cannot be stopped [SOLVED]
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. |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Win32::Daemon + socket->accept: service cannot be stopped
by svenXY (Deacon) on Jun 27, 2005 at 08:45 UTC |