Closed cmoulliard closed 10 years ago
You can use program :int_block
to provide a block that will get called on interrupt. Something like:
program :int_block do
# kill threads etc
# make sure to exit or abort, otherwise your program keeps running
exit 1
end
As Commander is able to intercept CTRL-C event (shutdown)
trap('INT') { abort program(:int_message) } if program(:int_message)
I would like to know if there is a event/listener available from Commander that we can use when such event occurs to call a method to kill a thread by example
The thread has been created when we have have call the function the first time the command has been received