I was about to add an extra signal handler to an app we have here and I noticed that the author had used sigaction()
to set up the other signal handlers. I was
To me, this below line was enough to decide:
The sigaction() function provides a more comprehensive and reliable mechanism for controlling signals; new applications should use sigaction() rather than signal()
http://pubs.opengroup.org/onlinepubs/009695399/functions/signal.html#tag_03_690_07
Whether you're starting from scratch or modifying an old program, sigaction should be the right option.