#endif
if (sudo_sigaction(SIGTERM, &sa, NULL) != 0)
sudo_warn(U_("unable to set handler for signal %d"), SIGTERM);
+ if (sudo_sigaction(SIGHUP, &sa, NULL) != 0)
+ sudo_warn(U_("unable to set handler for signal %d"), SIGHUP);
if (sudo_sigaction(SIGALRM, &sa, NULL) != 0)
sudo_warn(U_("unable to set handler for signal %d"), SIGALRM);
if (sudo_sigaction(SIGPIPE, &sa, NULL) != 0)
* When not running the command in a pty, we do not want to
* forward signals generated by the kernel that the child will
* already have received either by virtue of being in the
- * controlling tty's process group (SIGINT, SIGQUIT) or because
- * the session is terminating (SIGHUP).
+ * controlling tty's process group (SIGINT, SIGQUIT).
*/
#ifdef SA_SIGINFO
if (!log_io) {
sa.sa_sigaction = handler_user_only;
}
#endif
- if (sudo_sigaction(SIGHUP, &sa, NULL) != 0)
- sudo_warn(U_("unable to set handler for signal %d"), SIGHUP);
if (sudo_sigaction(SIGINT, &sa, NULL) != 0)
sudo_warn(U_("unable to set handler for signal %d"), SIGINT);
if (sudo_sigaction(SIGQUIT, &sa, NULL) != 0)