guard / guard-spork

Guard::Spork automatically manage Spork DRb servers
https://rubygems.org/gems/guard-spork
MIT License
296 stars 58 forks source link

Guard spork should not send KILL signal in stop #74

Closed fabn closed 12 years ago

fabn commented 12 years ago

I'm trying to debug this issue and I found that at_exit callback of that gem is not executed because guard-spork sends a SIGKILL to the spork process.

Is it possible to change the SIGKILL to a more conventional SIGTERM in order to avoid that kind of issues? Is there any drawback in doing that?

thibaudgg commented 12 years ago

I can't think to any drawback right now, please feel free to submit a pull request. Thx!

fabn commented 12 years ago

I've found that changing SIGTERM with SIGKILL doesn't solve my specific issue, since the at_exit isn't executed.

I've debugged some code and found out that at_exit callback of tester gem is not executed even using plain spork (without guard), but when I'm executing spork directly the solr process is terminated after spork termination, maybe because is a direct child of spork itself and spork do some cleanup on its child processes. I guess I should dig into spork internals to found why at_exit isn't executed at all.

thibaudgg commented 12 years ago

Any news about this one?

fabn commented 12 years ago

I've made the change, since SIGTERM could be more appropriate than SIGKILL, so if you want you can merge and close this issue.

BTW this doesn't solve my original issue i think I should dig into spork internals to understand why at_exit call isn't executed at all.

thibaudgg commented 12 years ago

Ok, thanks, merged!