RE: Detecting service stop with perlSvc
by Jan Dubois other posts by this author
Jun 2 2009 2:54PM messages near this date
Detecting service stop with perlSvc
|
Need help for open source and diagramming research
The ContinueRun() function will return a false value if your service is terminated. Note tha
t you are essentially polling for the
service state; if you issue any blocking system calls, or if you don't call ContinueRun() of
ten enough, then the Service Control
Manager will decide that your service is unresponsive and simply kill it. This typically ha
ppens after about 30 seconds.
Cheers,
-Jan
From: pdk-bounces@[...].com [mailto:pdk-bounces@[...].com] On Behalf Of Jeff Saxton
Sent: Tuesday, June 02, 2009 2:39 PM
To: pdk@[...].com
Subject: Detecting service stop with perlSvc
I see from the documentation <a href="http://docs.activestate.com/pdk/8.0/PerlSvc_overview.h
tml"> here </a>
and in the sample code for pingSvc that it is possible to trap when the service is paused an
d continued.
> > Is it also possible to trap when the service is stopped either through:
> > 1) net stop SERVICE
> > 2) system shutdown
TIA
Jeff Saxton
_____
Windows LiveT: Keep your life in sync. Check it out. <http://windowslive.com/explore?ocid=TX
T_TAGLM_WL_BR_life_in_synch_062009>
Thread:
Jeff Saxton
Jan Dubois
|