# Win32-service 0.6.0

**URL:** <https://www.ruby-forum.com/t/win32-service-0-6-0/121217>\
**Category:** Ruby\
**Created:** [November 25, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/win32-service-0-6-0/121217 "2007-11-25T14:59:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c57346/32.png) [@danielb](https://www.ruby-forum.com/u/danielb)\
**Post date:** [November 25, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/win32-service-0-6-0/121217/1 "2007-11-25T14:59:02Z")

</div>

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/](http://raa.ruby-lang.org/project/win32-service/)

Or visit the project page at [http://rubyforge.org/projects/win32utils/](http://rubyforge.org/projects/win32utils/)

Enjoy!

The Win32Utils Team
