Hi all,
The Win32Utils Team is very pleased to announce the release of win32-service 0.6.0. This release features lots of changes. Note that some of the changes are not backwards compatible. See below.
Special thanks goes out to Kevin Burge for a nice patch to the Daemon class that greatly improved its responsiveness with regards to event handling, especially service_stop.
= What is it?
A library for creating and controlling Services (i.e. daemons) on MS Windows.
= What's new?
* The Service control class is now pure Ruby. The Daemon class is still C, however. That may change in the future. This means the windows-pr library is now a prerequisite.
* The Service.new method has been altered in a way that is not backwards compatible. It is now the same as Service.create.
* The Service.start method now properly handles arguments to the Daemon#service_main method.
* The Daemon source code is now separate from the Service control class source code. That means you must require them separately, as needed, i.e. 'win32/service' vs 'win32/daemon'.
* The Daemon class should be much more responsive to service events now, especially service_stop. (Thanks Kevin)
* Added the Daemon.mainloop method as a shortcut for Daemon.new.mainloop.
* The Daemon class now redirects STDIN, STDOUT and STDERR to the NUL device if they're still associated with a terminal when the service starts. This should help prevent Errno::EBADF errors.
* The Service.services class method now supports the group parameter for versions of Ruby built with older compilers, i.e. it will now work with the one-click Ruby installer.
* The Service.getdisplayname method was changed to Service.get_display_name. An alias has been provided for backwards compatibility.
* The Service.getservicename method was changed to Service.get_service_name. An alias has been provided for backwards compatibility.
* Added the Service.config_info method.
* The Service.create and Service.configure methods now allow you to set failure actions, failure commands, and reset/retry periods.
* Improved test suite.
* Changed 'tdaemon.rb', 'tdaemon_ctl.rb' and 'service_test.rb' to 'demo_daemon.rb', 'demo_daemon_ctl.rb' and 'demo_services.rb', respectively.
* Some refactoring and updates to the demo daemon and demo daemon controller examples.
* The Win32Service struct is now ServiceInfo.
* ServiceError is now Service::Error.
* DaemonError is now Daemon::Error.
* Some documentation improvements, corrections and updates.
= Where can I get it?
gem install win32-service
You can also find it on the RAA at http://raa.ruby-lang.org/project/win32-service/
Or visit the project page at http://rubyforge.org/projects/win32utils/
Enjoy!
The Win32Utils Team