Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make sure Errno::ENOENT is raised when File.stat() fails #16

Merged
merged 1 commit into from Aug 12, 2012

Conversation

Projects
None yet
2 participants
Contributor

eric commented Feb 13, 2012

EventMachine::FileTail#handle_eof() is expecting an ENOENT when a stat
fails, but instead is getting back a nil stat struct.

It causes an unhappy exception:

/Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:395:in `handle_fstat': undefined method `ino' for nil:NilClass (NoMethodError)
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:333:in `block in handle_eof'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:370:in `read_file_metadata'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:332:in `handle_eof'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-tail-0.6.3/lib/em/filetail.rb:302:in `block in schedule_eof'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `call'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `block in run_deferred_callbacks'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `each'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:996:in `run_deferred_callbacks'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
    from /Users/eric/src/remote_syslog/vendor/bundle/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
    from /Users/eric/src/remote_syslog/lib/remote_syslog/cli.rb:164:in `start'
    from /Users/eric/src/remote_syslog/lib/remote_syslog/cli.rb:155:in `run'
    from /Users/eric/src/remote_syslog/lib/remote_syslog/cli.rb:17:in `process!'
    from /Users/eric/src/remote_syslog/bin/remote_syslog:6:in `<top (required)>'
    from /Users/eric/src/remote_syslog/vendor/bundle/bin/remote_syslog:19:in `load'
    from /Users/eric/src/remote_syslog/vendor/bundle/bin/remote_syslog:19:in `<main>'
@eric eric Make sure Errno::ENOENT is raised when File.stat() fails
EventMachine::FileTail#handle_eof() is expecting an ENOENT when a stat
fails, but instead is getting back a nil stat struct.
dd3b47f

@jordansissel jordansissel added a commit that referenced this pull request Aug 12, 2012

@jordansissel jordansissel Merge pull request #16 from eric/dont-squelch-enoent
Make sure Errno::ENOENT is raised when File.stat() fails
84e5a30

@jordansissel jordansissel merged commit 84e5a30 into jordansissel:master Aug 12, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment