Based on @ttilley explanation in https://github.com/thibaudgg/rb-fsevent/issues/17, signal handlers registration should happen before any subprocess creation (fsevent_watch for instance) to be properly catches by the subprocess.

Note that in the case when guard is run via bundler, this –quoting @ttilley– "would make this an unsolvable problem" (isn't it dramatic?! ;)).
This commit is contained in:
Rémy Coutable 2011-07-30 23:58:53 +02:00
parent 6b30238735
commit b34cd1acfb
2 changed files with 3 additions and 2 deletions

View File

@ -24,9 +24,10 @@ module Guard
end end
def start(options = {}) def start(options = {})
Interactor.init_signal_traps
setup(options) setup(options)
Interactor.init_signal_traps
Dsl.evaluate_guardfile(options) Dsl.evaluate_guardfile(options)
listener.on_change do |files| listener.on_change do |files|

View File

@ -37,7 +37,7 @@ module Guard
stop stop
end end
else else
UI.info "Your system doesn't support INT signal, so Ctrl-C (stop) won't work" UI.info "Your system doesn't support INT signal, so Ctrl-C (Stop) won't work"
end end
# Reload (Ctrl-Z) # Reload (Ctrl-Z)