Displaying 2 results from an estimated 2 matches for "demo_daemon_ctl".
2011 Aug 22
2
Pure Ruby TCP Daemon
...all,
I created a "pure" branch on github that uses the code Heesob posted a while
back:
http://rubyforge.org/pipermail/win32utils-devel/2008-November/001274.html
However, I couldn''t make it work on my Vista laptop.
c:\Users\djberge\Repositories\win32-service\examples>ruby demo_daemon_ctl.rb
start
VERSION: 0.8.0
C:/Ruby187/lib/ruby/gems/1.8/gems/win32-service-0.8.0/lib/win32/service.rb:7
53:in `start'': The servi
ce did not respond to the start or control request in a timely fashion.
(Win32::Service::Error)
from demo_daemon_ctl.rb:68
I also tried with Ruby 1.9/mingw...
2007 Nov 24
5
Service.start arguments failing or causing segfault
...that it looks like this:
def service_main(args = nil)
msg = ''service_main entered at: '' + Time.now.to_s
File.open(LOG_FILE, ''a+''){ |f|
f.puts msg
f.puts "Args: " + args.join('','') if args
}
...
end
In the demo_daemon_ctl.rb script, I modified the start option like so:
Service.start(SERVICE_NAME, nil, ''hello'', ''world'')
As things stand now I get:
C:/ruby/lib/ruby/site_ruby/1.8/win32/service.rb:684:in `start'': The
service did not respond to the start or control requ
est...