You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Process.kill returns as soon as the system call goes through but sometimes the process hangs around and can cause running? to see that it's still running and can cause problems for tasks that need to restart Sphinx.
It would be useful to return the result of running? after calling Process.kill. This way we could retry or wait until it truly is no longer running. Or, possibly returning !running? to indicate that it was stopped or wasn't.
Alternatively, we could handle polling running? until it actually is stopped and then return.
The text was updated successfully, but these errors were encountered:
I've changed #stop so it returns !running? - ie: an indication that Sphinx is not running, as you've suggested. Not sure when I'll get to the TS ticket for this too, but I was just on a roll with Riddle tonight :)
Awesome, I was going to fork and submit a pull request if you gave the go ahead. That's really all I was waiting for, haha.
I don't mind doing the legwork on the TS ticket but there are several options and I wanted your feedback before I started. This fix is fairly integral, though.
Another thing is if Riddle::Controller#stop is called and it finally has stopped, I think it raises Errno::ESRCH (couldn't find process) error, so we might want to rescue for that error and return true in that case (as in, it's no longer running but was when last we tested if it was running).
amiryal
pushed a commit
to amiryal/riddle
that referenced
this issue
Mar 22, 2017
Process.kill
returns as soon as the system call goes through but sometimes the process hangs around and can causerunning?
to see that it's still running and can cause problems for tasks that need to restart Sphinx.It would be useful to return the result of
running?
after callingProcess.kill
. This way we could retry or wait until it truly is no longer running. Or, possibly returning!running?
to indicate that it was stopped or wasn't.Alternatively, we could handle polling
running?
until it actually is stopped and then return.The text was updated successfully, but these errors were encountered: