summaryrefslogtreecommitdiffstats
path: root/sshd-session.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@dtucker.net>2024-07-25 09:59:35 +0200
committerDarren Tucker <dtucker@dtucker.net>2024-07-25 09:59:35 +0200
commitb05fda224bbcd2f641254534ed2175c42487f3c8 (patch)
tree3b48efb4c0db97a2b6d3655e33de6c26fdbd3bd5 /sshd-session.c
parentClass-imposed login restrictions (diff)
downloadopenssh-b05fda224bbcd2f641254534ed2175c42487f3c8.tar.xz
openssh-b05fda224bbcd2f641254534ed2175c42487f3c8.zip
Check for SA_RESTART before using it.
ok djm@
Diffstat (limited to 'sshd-session.c')
-rw-r--r--sshd-session.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sshd-session.c b/sshd-session.c
index 52e7bd82d..1060ff7d8 100644
--- a/sshd-session.c
+++ b/sshd-session.c
@@ -214,7 +214,9 @@ grace_alarm_handler(int sig)
memset(&sa, 0, sizeof(sa));
sa.sa_handler = SIG_IGN;
sigfillset(&sa.sa_mask);
+#if defined(SA_RESTART)
sa.sa_flags = SA_RESTART;
+#endif
(void)sigaction(SIGTERM, &sa, NULL);
kill(0, SIGTERM);
}