Factor out duplicate signal handling code

No options are set for SIGTERM, so we can use the simpler
signal handling interface and remove unnecessary structure initilization.

sigemptyset() is moved outside of the ifdef to prevent any potential
unused variable warning.