[Win32utils-devel] win32-service patch
phasis at gmail.com
Mon Jun 17 05:21:01 UTC 2013
2013/6/17 Daniel Berger <djberg96 at gmail.com>:
> It's looking good! I did reorganize the code a bit - moving functions,
> structs and constants to their individual files.
> It worked fine with MRI. The only quirk I noticed was that Service.start
> seemed to block on the command line for me, but it did work.
The blocking is due to the line #173 of deamon.rb
service_init() if respond_to?('service_init')
If you remove the service_init method from demo_deamon.rb, the
blocking will disappear.
> For JRuby, I was able to install the demo service fine, but when I tried to
> start it I got this:
> Errno::ENOENT: No such file or directory - StartService: The system cannot
> find the file specified.
> raise_windows_error at
> start at
> c:/Users/djberge/Repositories/win32-service/lib/win32/service.rb:725 (root)
> at examples\demo_daemon_ctl.rb:68
This error is due to the invalid ruby executable name at #49 of
ruby = File.join(CONFIG['bindir'], 'ruby').tr('/', '\\')
ruby = File.join(CONFIG['bindir'], CONFIG['ruby_install_name']).tr('/', '\\')
> Maybe it's not liking the args pointer approach used there, but I'm not
> I'll futz with it some more tomorrow.
More information about the win32utils-devel