[Win32utils-devel] Stopping services
ntalbott at gmail.com
Thu Sep 8 13:53:36 EDT 2005
I'm back to getting stuff to run as a Windows service, and am running
in to a problem. My service (a Daemon ruby class) installs and starts
fine, but when I try to stop it, I get:
C:\workspaces\default\tahoe>ruby script\service stop
script/service:77:in `stop': An exception occurred in the service
the control request. (Win32::ServiceError)
from script/service:76:in `call'
Note that I only get this if the service has successfully made it in
to service_main - if I stop it before that, it stops OK.
I wanted to back up and see if the examples worked OK for me, so I ran
C:\build\ruby\extensions\win32-service-0.4.6\examples>ruby daemon_test.rb stop
daemon_test.rb:59:in `stop': The pipe has been ended. (Win32::ServiceError)
Note that you need to wait to attempt the stop until after the service
has started writing "service is running" to C:\test.log before it will
Any ideas on either of these problems, and/or ways to debug better?
I'm running ruby1.8.3p1 compiled locally with MSVC (7, I think), with
win32-service-0.4.6 on XP Pro SP2.
More information about the win32utils-devel