Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some errors on Windows #1

Open
Magicdream opened this issue Aug 19, 2009 · 3 comments
Open

Some errors on Windows #1

Magicdream opened this issue Aug 19, 2009 · 3 comments

Comments

@Magicdream
Copy link

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:inkill'
: Invalid argument (Errno::EINVAL)"

Please help. I think this is a bug.

@Magicdream
Copy link
Author

Sorry for formatting. Github parser suck

@FooBarWidget
Copy link
Owner

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.

@bbuchalter
Copy link

This could probably be closed, no? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants