From: Daniel Berger Date: 2006-11-26T03:10:08+09:00 Subject: [ANN] win32-service 0.5.2 Hi all, The Win32Utils Team is happy to announce the release of win32-service 0.5.2. Normally I don't announce minor releases, but this one contains a fix for the dreaded thread blocking issue (you know, where you would call Service.stop, and the your Daemon would just kinda hang). Many thanks go to Patrick Hurley for his patch. You can find it on the RAA (as win32-service) or on RubyForge (as part of the win32utils project). But wait! There are other goodies, too: - I've added the Daemon#running? helper method for use within your service_main code. So, your Daemon class should generally always look something like this: class Daemon def service_main while running? if state == RUNNING # As opposed to IDLE or PAUSED # Your loop here else sleep 1 end end end end - I've scrapped the old daemon example code in the 'example' subdirectory (which didn't actually work) and replaced it with two separate files - tdaemon.rb and tdaemon_ctl.rb. It's a simple service that writes a short text message to your c:\ drive every 5 seconds. Oh, and it actually works. :) - There's now a gem (that we host). This is a C extension, so you'll still need a C compiler to build and install the gem. If you don't have a C compiler, you can download the shared object directly from the project page at http://rubyforge.org/frs/download.php/15016/service-0.5.2-vc6.so. Rename the file to just "service.so" and copy it manually to c:\ruby\lib\ruby\1.8\i386-mswin32\win32. That's it for now. Enjoy! The Win32Utils Team