Added a proper SIGHUP handler to patplex.