daemon_controller
daemon_controller copied to clipboard
Some errors on Windows
Hi! I use your daemon_controller to start thinkin_sphinx plugin. I use this code http://michalkuklis.com/blog/ to start plugin. I have error in daemon_controller.rb in method kill_daemon_with_signal. "C:/Ruby/lib/ruby/gems/1.8/gems/daemon_controller-0.2.1/lib/daemon_controller.rb:362:in `kill' : Invalid argument (Errno::EINVAL)"
I look at the daemon_controller.rb in method kill_daemon_with_signal. " def kill_daemon_with_signal pid = read_pid_file if pid Process.kill('SIGTERM', pid) end rescue Errno::ESRCH, Errno::ENOENT end " But my(or all?) Windows didn't have 'SIGTERM' signal. I write this test program "Signal.list.each { |name, i| puts "#{name} #{i}" }" And it's write: "SEGV 11 KILL 9 TERM 15 INT 2 FPE 8 ABRT 22 ILL 4 EXIT 0"
I change 'SIGTERM' to 'KILL' and it's(this moment) works, but i have following error:
"C:/Ruby/lib/ruby/gems/1.8/gems/daemon_controller-0.2.1/lib/daemon_controller.rb:330:in start_without_locking' : Daemon 'Sphinx search server' failed to start in time. (DaemonController::StartTimeout)" And I try change signal to 'TERM', but have same error "C:/Ruby/lib/ruby/gems/1.8/gems/daemon_controller-0.2.1/lib/daemon_controller.rb:362:in
kill'
: Invalid argument (Errno::EINVAL)"
Please help. I think this is a bug.
Sorry for formatting. Github parser suck
Could be a bug. I've never tested it on Windows, and I don't have a Windows development environment ready. Any patches are welcome of course.
In think you need to look at the routines for checking whether a process is running. It's possible that they don't work well on Windows.
This could probably be closed, no? :)