Use sigaction rather than signal

On my system (eglibc 2.17-93ubuntu4), signal() internally calls
sigaction with SA_RESETHAND set.
Make sure that flag is unset so the signal handler is not reset to default.