[Win32utils-devel] win32-service patch
phasis at gmail.com
Mon Jun 17 13:23:47 UTC 2013
2013/6/17 Daniel Berger <djberg96 at gmail.com>:
> On Sun, Jun 16, 2013 at 11:21 PM, Heesob Park <phasis at gmail.com> wrote:
>> 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
>> 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
I guess this is an environment issue.
In my test with jruby-1.7.4, it works fine and the log file looks good.
service_main entered at: 2013-06-17 22:21:12 +0900
Service is running as of: 2013-06-17 22:21:32 +0900
Service is running as of: 2013-06-17 22:21:52 +0900
Service is running as of: 2013-06-17 22:22:12 +0900
More information about the win32utils-devel