From 8d610ba26a3041f567441d7260f47425ef52012b Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 10 Jan 2010 22:07:13 +0000 Subject: * Backport from upstream: - After sshd receives a SIGHUP, ignore subsequent HUPs while sshd re-execs itself. Prevents two HUPs in quick succession from resulting in sshd dying (LP: #497781). --- sshd.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index f61d79ec7..b83ecd9e5 100644 --- a/sshd.c +++ b/sshd.c @@ -317,6 +317,7 @@ sighup_restart(void) close_listen_socks(); close_startup_pipes(); alarm(0); /* alarm timer persists across exec */ + signal(SIGHUP, SIG_IGN); /* will be restored after exec */ execv(saved_argv[0], saved_argv); logit("RESTART FAILED: av[0]='%.100s', error: %.100s.", saved_argv[0], strerror(errno)); -- cgit v1.2.3