Skip to content

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

@lucas-clemente

Description

@lucas-clemente

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions