[Win32utils-devel] win32-service cvs - potential issue with Service.services

Daniel Berger djberg96 at gmail.com
Mon Jun 19 21:51:49 EDT 2006

Heesob Park wrote:
> Hi,
> 2006/6/19, Daniel Berger <djberg96 at gmail.com>:
>> Hi all,
>> I'm preparing win32-service for an 0.5.1 release.  I've made a couple
>> minor changes and altered the test suite a bit.  It passes on my box
>> here, except that about half the time I get this error:
>> 1) Error:
>> test_services(TC_Win32Service):
>> Win32::ServiceError: OpenService() call failed: The handle is invalid.
>>    test/tc_service.rb:227:in `services'
>>    test/tc_service.rb:227:in `test_services'
>> 45 tests, 145 assertions, 0 failures, 1 errors
>> If I run this test by itself via -n test_services, it always passes.  Is
>> this just an issue with interaction with Test::Unit itself?  Or am I
>> leaving a filehandle open somewhere that I've missed?
> I don't know why, but if I commented out the line #1082 of serivce.c like this:
> //         CloseServiceHandle(hSCService);
>  the test works without errors.
> Regards,
> Park Heesob
> _______________________________________________
> win32utils-devel mailing list
> win32utils-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/win32utils-devel
Hm....maybe this remark has something to do with it:

The *CloseServiceHandle* function does not destroy the service control 
manager object referred to by the handle. A service control manager 
object cannot be destroyed.

My guess is that it's related to Test::Unit's threading somehow.  I'm 
not going to worry about it for now.  Expect a release soon. :)



More information about the win32utils-devel mailing list