Should be used for sigkill
and sigstop
since they cannot be caught,
blocked or ignored.
You should consider this methods as being fragile. It should be implemented in C and you should not do too much callbacks to Nit.
class MyReceiver
super SignalHandler
redef fun receive_signal_unsafe(signal) do print "received unsafely {signal}"
end
var r = new MyReceiver
r.handle_signal(sigsegv, false)
# Called immediatly on receiving an unsafe signal (should be redefed by subclasses)
#
# Should be used for `sigkill` and `sigstop` since they cannot be caught,
# blocked or ignored.
#
# You should consider this methods as being fragile. It should be implemented in C
# and you should not do too much callbacks to Nit.
#
# class MyReceiver
# super SignalHandler
#
# redef fun receive_signal_unsafe(signal) do print "received unsafely {signal}"
# end
#
# var r = new MyReceiver
# r.handle_signal(sigsegv, false) # `r.receive_signal_unsafe` will be invoked on sigsegv
fun receive_signal_unsafe(signal: Int) do end
lib/signals/signals.nit:121,2--137,46