Use sigaction instead of signal.

The signal man page recommends sigaction:
   APPLICATION USAGE
       The  sigaction() function provides a more comprehensive and reliable
       mechanism for controlling signals; new applications should use
       sigaction() rather than signal().
Merge pull request #2 from febdoctor/sigaction

Use sigaction instead of signal.