Fixing signal handler when sighup is sent to the factory