diff --git a/~/Crystal/ctrl-c_interrupt.cr b/~/Crystal/ctrl-c_interrupt.cr new file mode 100644 index 0000000..46669ac --- /dev/null +++ b/~/Crystal/ctrl-c_interrupt.cr @@ -0,0 +1,9 @@ +LibC.signal Signal::INT.value, ->(s : Int32) { + puts "CTRL-C handler here!" + exit +} + +Signal::INT.trap do + puts "CTRL-C handler here!" + exit +end