diff options
| author | mo khan <mo@mokhan.ca> | 2013-08-28 07:20:13 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2013-08-28 07:20:13 -0600 |
| commit | db1191ec0e7305d684383f8974e2fa437f77ad5a (patch) | |
| tree | 5e27b197dff849d22d8e1f50eb75aa499b16bd06 /code/snippets/decorate_default_signal_behaviour.rb | |
Diffstat (limited to 'code/snippets/decorate_default_signal_behaviour.rb')
| -rw-r--r-- | code/snippets/decorate_default_signal_behaviour.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/code/snippets/decorate_default_signal_behaviour.rb b/code/snippets/decorate_default_signal_behaviour.rb new file mode 100644 index 0000000..b27bb1c --- /dev/null +++ b/code/snippets/decorate_default_signal_behaviour.rb @@ -0,0 +1,6 @@ +system_handler = trap(:INT) { + puts 'about to exit!' + system_handler.call +} +sleep 5 # so that we have time to send it a signal + |
