[fix] Fix signal handling

Do not reset signal handlers to `SIG_IGN` if they were set to it
previously.

Explicitly exit when a signal is received.