[Win32utils-devel] Hooks for win32-service

win32utils-devel at rubyforge.org win32utils-devel at rubyforge.org
Tue Feb 3 11:24:33 EST 2004


> 
> Just trying to come up with hooks for win32-service.  It looks like
> Perl's Win32::Daemon defines these:
> 
> start....................The service is starting.
> pause....................The service is entering a paused state.
> continue.................The service is resuming from a paused state.
> stop.....................The service is stopping
> running..................The service is running
> interrogate..............The service is being queried for information.
> shutdown.................The system is being shut down.
> param_change.............There has been a parameter change to the
> system.
> net_bind_add.............A new network binding has been made.
> net_bind_remove..........A network binding has been removed.
> net_bind_enable..........A network binding has been enabled.
> net_bind_disable.........A network binding has been disabled.
> device_event.............A device has generated some event.
> hardware_profile_change..A change has been made to the system's hardware
> profile.
> power_event..............A power event has occured (eg change to battery
> power).
> session_change...........There has been a change in session.
> user_defined.............A user defined event has been sent to the
> service.
> 
> We can change the names as we see fit obviously.  Should we also add
> hooks for pause_pending, start_pending, and stop_pending?
> 
> I'm primarily concerned with the start, stop, continue, running and
> shutdown hooks.  At least that's where I'd like to start initially.
> 
> I'm not sure what Python defines.
> 
> Just some ideas. :)
> 
> Regards,
> 
> Dan
> 

I added service control signal hooks in service.c and daemon_test.c
Enjoy and modify code for your taste.
My code may be not suitable for your taste :-)

There was bug in daemon_test.c 
"state==SERVICE_RUNNING" should be "state==RUNNING".

Regards,

Park Heesob



--MIME Multi-part separator--



More information about the win32utils-devel mailing list