on_signal decorator