[openssh-commits] [openssh] 01/02: upstream commit

git+noreply at mindrot.org git+noreply at mindrot.org
Mon Dec 5 17:24:59 AEDT 2016


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit f2398eb774075c687b13af5bc22009eb08889abe
Author: dtucker at openbsd.org <dtucker at openbsd.org>
Date:   Sun Dec 4 22:27:25 2016 +0000

    upstream commit
    
    Unlink PidFile on SIGHUP and always recreate it when the
    new sshd starts. Regression tests (and possibly other things) depend on the
    pidfile being recreated after SIGHUP, and unlinking it means it won't contain
    a stale pid if sshd fails to restart.  ok djm@ markus@
    
    Upstream-ID: 132dd6dda0c77dd49d2f15b2573b5794f6160870
---
 sshd.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sshd.c b/sshd.c
index fafcd34..53107ca 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.478 2016/11/30 00:28:31 dtucker Exp $ */
+/* $OpenBSD: sshd.c,v 1.479 2016/12/04 22:27:25 dtucker Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -290,6 +290,8 @@ static void
 sighup_restart(void)
 {
 	logit("Received SIGHUP; restarting.");
+	if (options.pid_file != NULL)
+		unlink(options.pid_file);
 	platform_pre_restart();
 	close_listen_socks();
 	close_startup_pipes();
@@ -1841,7 +1843,7 @@ main(int ac, char **av)
 		 * Write out the pid file after the sigterm handler
 		 * is setup and the listen sockets are bound
 		 */
-		if (options.pid_file != NULL && !debug_flag && !already_daemon) {
+		if (options.pid_file != NULL && !debug_flag) {
 			FILE *f = fopen(options.pid_file, "w");
 
 			if (f == NULL) {

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list