guard / guard-spork

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

Using Ctrl-\ on guard-spork 0.1.5 raises exception and appears to kill Spork #12

Closed shanesveller closed 13 years ago

shanesveller commented 13 years ago

This gist should hopefully have all the relevant files. Here's the console output, which is also included in the gist:

% guard
Guard::RSpec is running!
Guard is now watching at '/Users/shane/ruby/thisisneat'
Guard::Passenger is running!
[...]
Passenger standalone started.
Starting Spork for RSpec
Using RSpec
Preloading Rails environment
Loading Spork.prefork block...
Spork is ready and listening on 8989!
Spork for RSpec successfully started
^\SIGQUIT (SignalException)
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/lib/spork/server.rb:33:in `join'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/lib/spork/server.rb:33:in `listen'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/lib/spork/server.rb:20:in `run'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/lib/spork/runner.rb:75:in `run'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/lib/spork/runner.rb:10:in `run'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/gems/spork-0.9.0.rc4/bin/spork:10:in `<top (required)>'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/bin/spork:19:in `load'
/Users/shane/.rvm/gems/ruby-1.9.2-p136@thisisneat/bin/spork:19:in `<main>'
Running all specs
No DRb server is running. Running in local process instead ...
[...]
shanesveller commented 13 years ago

This behavior is exhibited with both spork 0.9.0.rc3 and rc4.

irohiroki commented 13 years ago

This can be avoided if spork server could ignroe SIG_QUIT, like irohiroki/spork@285a57813f5390fed1b3ab869f36aaae35baef4e, but the problem is it's in the spork source tree. any ideas?

thibaudgg commented 13 years ago

Did you ask timcharper about that?

irohiroki commented 13 years ago

me? no, I didn't. ask what? to ignore SIG_QUIT?

since we can use our own fork, I don't see any need for asking. rather, I like to know if there's a chance to solve this in the parent process (from my curiosity.)

Shane, is my commit irohiroki/spork@285a578 enough for you? if so, this issue can be closed.

shanesveller commented 13 years ago

Yes, the commit you indicated worked correctly when I referenced it in my Gemfile.