# HG changeset patch # User Tomas Kuthan # Date 1484165535 28800 # Node ID 2adf9e2cdc698fdc4c9a35e39d6f706faaebe4f2 # Parent 64cbdac1f406e77dfcc570e4fe5a1c5441f7c1c1 25044066 sshd error: session_by_pid: unknown pid when root ssh session exits diff -r 64cbdac1f406 -r 2adf9e2cdc69 components/openssh/patches/047-login_grace_time_watchdog.patch --- a/components/openssh/patches/047-login_grace_time_watchdog.patch Wed Jan 11 12:12:15 2017 -0800 +++ b/components/openssh/patches/047-login_grace_time_watchdog.patch Wed Jan 11 12:12:15 2017 -0800 @@ -36,7 +36,7 @@ #ifdef WITH_SSH1 static void do_ssh1_kex(void); -@@ -369,12 +376,98 @@ grace_alarm_handler(int sig) +@@ -369,12 +376,102 @@ grace_alarm_handler(int sig) signal(SIGTERM, SIG_IGN); kill(0, SIGTERM); } @@ -128,6 +128,10 @@ + } + + kill(grace_watchdog_pid, SIGTERM); ++ while (waitpid(grace_watchdog_pid, NULL, 0) < 0) { ++ if (errno == EINTR) ++ continue; ++ } + grace_watchdog_pid = -1; +} + @@ -135,7 +139,7 @@ /* * Signal handler for the key regeneration alarm. Note that this * alarm only occurs in the daemon waiting for connections, and it does not -@@ -723,6 +816,7 @@ privsep_preauth(Authctxt *authctxt) +@@ -723,6 +820,7 @@ privsep_preauth(Authctxt *authctxt) /* child */ close(pmonitor->m_sendfd); close(pmonitor->m_log_recvfd); @@ -143,7 +147,7 @@ /* Arrange for logging to be sent to the monitor */ set_log_handler(mm_log_handler, pmonitor); -@@ -2235,8 +2329,10 @@ main(int ac, char **av) +@@ -2235,8 +2333,10 @@ main(int ac, char **av) * are about to discover the bug. */ signal(SIGALRM, grace_alarm_handler); @@ -155,7 +159,7 @@ sshd_exchange_identification(ssh, sock_in, sock_out); -@@ -2302,6 +2398,7 @@ main(int ac, char **av) +@@ -2302,6 +2402,7 @@ main(int ac, char **av) */ alarm(0); signal(SIGALRM, SIG_DFL);