KWSys 2026-09-28 (9fb826eb)

Code extracted from:

    https://gitlab.kitware.com/utils/kwsys.git

at commit 9fb826ebca7d73ea64a94b8e8ec86cc3b6841b1b (master).

Upstream Shortlog
-----------------

Michael Pratt (1):
      2c678e28 Process: Continue to ignore hangups if SIGHUP is ignored
This commit is contained in:
KWSys Upstream authored and Brad King committed 2026-09-28 08:22:37 -04:00
1 parent b8cdd8c26e
commit 31d645bc1e
1 file changed
+9 -3
+9 -3
View File
@@ -2339,14 +2339,20 @@ static void kwsysProcessChildErrorExit(int errorPipe)
}
/* Restores all signal handlers to their default values. */
/* However, preserve SIGHUP if ignored, e.g. using nohup. */
static void kwsysProcessRestoreDefaultSignalHandlers(void)
{
struct sigaction act;
#ifdef SIGHUP
sigaction(SIGHUP, 0, &act);
if (act.sa_handler != SIG_IGN) {
memset(&act, 0, sizeof(struct sigaction));
act.sa_handler = SIG_DFL;
sigaction(SIGHUP, &act, 0);
}
#endif
memset(&act, 0, sizeof(struct sigaction));
act.sa_handler = SIG_DFL;
#ifdef SIGHUP
sigaction(SIGHUP, &act, 0);
#endif
#ifdef SIGINT
sigaction(SIGINT, &act, 0);
#endif