[FIX] Signal handlers can only use async-safe functions

Calling longjmp starts executes the code following the most recent setjmp in the current context, which in this case means in the context of a signal handler. As such the code that is executed must be async-signal-safe (as in signal(7)) because it can be interrupted by other signals.