Added the ability to call a user defined function for the SIGHUP and SIGUSR1 signals.