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

Error when executing system() in Signal.trap #46

Open
lucas-clemente opened this issue Jul 16, 2012 · 1 comment
Open

Error when executing system() in Signal.trap #46

lucas-clemente opened this issue Jul 16, 2012 · 1 comment

Comments

@lucas-clemente
Copy link

The following watchr file

system('echo')
Signal.trap 'QUIT' do
  system('echo')
end

Throws an exception when triggering the signal:

^\/Volumes/HDD/data/lucas/test/watchr/watchr.rb:3:in `system': native_thread_join() failed (11) (ThreadError)
    from /Volumes/HDD/data/lucas/test/watchr/watchr.rb:3:in `block in parse!'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/ruby-fsevent-0.2.1/lib/fsevent/signal_ext.rb:19:in `call'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/ruby-fsevent-0.2.1/lib/fsevent/signal_ext.rb:19:in `handle'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/watchr-0.7/lib/watchr/event_handlers/darwin.rb:40:in `start'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/watchr-0.7/lib/watchr/event_handlers/darwin.rb:40:in `listen'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/watchr-0.7/lib/watchr/controller.rb:42:in `run'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/gems/1.9.1/gems/watchr-0.7/bin/watchr:104:in `<top (required)>'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/bin/watchr:23:in `load'
    from /Volumes/HDD/data/lucas/.rvm/rubies/ruby-1.9.3-p194/bin/watchr:23:in `<main>'

I'm using ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin10.8.0] on Mac OS 10.6.8.

@lucas-clemente
Copy link
Author

All of the lines in the above are necessary, when I remove the first system call it works.

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

1 participant