cmilfo has asked for the wisdom of the Perl Monks concerning the following question:
That is not a problem. The problem arises in that while the loop is sleeping, it can not be interrupted (i.e. In UNIX I can trap a signal and exit, awake, etc). Under NT (using PerlSvc), I've not found a way to do this. When a user goes to Stop the NT Service from the Services Menu, it hangs until the Stop times out or the loop wakes up and checks ContinueRun(). In the past I've had a $Asleep variable and check it when coming into the while loop. If it is true, I sleep 20 more seconds; if it is false, I run the real code and then set it to true. I do this until I've slept X amount (defined by the user).while (ContinueRun()) { # your loop code here # sleep }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: SOAP in an NT Service
by $code or die (Deacon) on Jan 26, 2002 at 03:39 UTC | |
by cmilfo (Hermit) on Jan 26, 2002 at 04:15 UTC |