fluent/fluentd — pull request #132 by tagomoris (2013-05-07 12:14:12+00:00)
Title: fix to ignore error in signal trap context

In singnal trap context (typically when fluentd shutdowns), Engine.emit always fails to get thread lock, and logged 'unexpected error' with exception like below:
```
2013-05-07 18:19:37 +0900 [warn]: emit transaction failed error="can't be called from trap context"
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:185:in `lock'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:185:in `mon_enter'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/2.0.0/monitor.rb:209:in `mon_synchronize'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/gems/2.0.0/gems/fluentd-0.10.33/lib/fluent/buffer.rb:166:in `emit'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/gems/2.0.0/gems/fluentd-0.10.33/lib/fluent/output.rb:408:in `emit'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/gems/2.0.0/gems/fluentd-0.10.33/lib/fluent/match.rb:38:in `emit'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/gems/2.0.0/gems/fluentd-0.10.33/lib/fluent/engine.rb:120:in `emit_stream'
2013-05-07 18:19:37 +0900 [warn]: .../ruby-2.0.0/lib/ruby/gems/2.0.0/gems/fluentd-0.10.33/lib/fluent/engine.rb:101:in `emit'
(snip)
```

We need log emit queue architecture to emit such that logs correctly, but it is too hard to hack for v10.
With this patch, fluentd simply ignores errors for emit of logs (especially in shutdown).