diff options
Diffstat (limited to 'sample/trap.rb')
-rw-r--r-- | sample/trap.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sample/trap.rb b/sample/trap.rb new file mode 100644 index 0000000000..e552a0fddc --- /dev/null +++ b/sample/trap.rb @@ -0,0 +1,3 @@ +trap('print("C-c handled\n")', 'INT', 'HUP') +print("---\n") +while gets(); print($_) end |