ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> pdk
pdk
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved