[Win32utils-devel] win32-service patch

Daniel Berger djberg96 at gmail.com
Mon Jun 17 13:01:29 UTC 2013


On Sun, Jun 16, 2013 at 11:21 PM, Heesob Park <phasis at gmail.com> wrote:

> Hi,
>
> 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')
>

It seemed to block even after 10 seconds, but the next time I tried, it
worked fine. Hm, nevermind. :)



>
> 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
> >
> c:/Users/djberge/Repositories/win32-service/lib/win32/windows/helper.rb:36
> > 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
> demo_daemon_ctl.rb
> ruby = File.join(CONFIG['bindir'], 'ruby').tr('/', '\\')
> should be
> ruby = File.join(CONFIG['bindir'], CONFIG['ruby_install_name']).tr('/',
> '\\')


Oops, thanks.

However, it seems the JVM takes too long to spin up. When I try to start
the service, I get the "did not start in a timely fashion" error with
JRuby. Although, I would think the service_init method would give it enough
time. From watching the log file, though, it doesn't look like it ever gets
to service_init.

Regards,

Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20130617/1ac7312d/attachment-0001.html>


More information about the win32utils-devel mailing list