perplexes / m2r

Mongrel2 Connection Adapter - Ruby Encrusted Steel-Reinforced Fist
MIT License
90 stars 11 forks source link

Handle signals #22

Open paneq opened 12 years ago

paneq commented 12 years ago

For:

Signal handling should be defined in our m2r binary instead of in the handler itself (as it is currently in rack-adapter branch).

mostlyobvious commented 12 years ago

What do you mean by m2r binary?

paneq commented 12 years ago

bin/m2r in the future.

paneq commented 12 years ago

I think that signal handling should be easy to turn off in case someone wants to use our library in another libary or tests or something and handle them suitable to his/her needs.

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/4039

I am not sure which part of this information is still true but we should be aware of the fact that #trap overwrites previous trap calls for particular signals. And that it is called in main thread (probably). That might be important when we become multithreading software.

paneq commented 11 years ago

http://blog.rubybestpractices.com/posts/ewong/016-Implementing-Signal-Handlers.html

paneq commented 11 years ago

http://blog.headius.com/2008/02/ruby-threadraise-threadkill-timeoutrb.html http://docs.oracle.com/javase/1.5.0/docs/guide/misc/threadPrimitiveDeprecation.html