Created
July 11, 2011 00:52
-
-
Save floere/1075153 to your computer and use it in GitHub Desktop.
When trapping Signals in your lib, please think about doing it like so:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# When trapping Signals in your lib, please think about doing it like so: | |
# | |
old_handler = Signal.trap('SIGNALNAME') {} | |
Signal.trap('SIGNALNAME') do | |
# Whatever you'd like to do. | |
# Then: | |
old_handler.call | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Absolutely.