[Win32utils-devel] win32/service... still with problems.

Luis Lavena luislavena at gmail.com
Mon May 22 12:00:36 EDT 2006

Hello list,

In my quest to get Mongrel working as service for win32, found some
problems with win32/service that make it impossible to solve.

Attached is the simplest service script I could do with ruby, which
depends on win32/service.

I found that doing anything complex in service_stop (killing threads,
doing file handling, even sleeping for 0.25 seconds). crash the
service with backtraces (of the service) like this:

dead_service.rb:119:in `service_main': uninitialized constant RUNNING
	from U:/Programming/Sources/ruby/try/dead_service.rb:131

Just commenting the sleep command solves that problem, but leaves
other issues there... like the impossible task of killing running
threads (from a ThreadGroup, as example).

Also, removing the while state == RUNNING loop solves the sleep and
file handling issues, but still exist problems with already running
threads that must be killed/stopped.

Or: I'm doing something wrong (in which case please enlighten me) or
there is something wrong on how the threading model is implemented?
(and the mix of C threads with ruby threads).

Thanks in advance for your time,


Luis Lavena
Multimedia systems
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
is worthwhile.
Vince Lombardi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dead_service.rb
Type: application/octet-stream
Size: 3360 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/win32utils-devel/attachments/20060522/1270f741/attachment.obj 

More information about the win32utils-devel mailing list