From 6f83b8e34d3dc8227d7cf39989c5966abde2305e Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Tue, 2 May 2000 09:23:45 +1000 Subject: - OpenBSD CVS update [channels.c] - init all fds, close all fds. [sshconnect2.c] - check whether file exists before asking for passphrase [servconf.c servconf.h sshd.8 sshd.c] - PidFile, pr 1210 [channels.c] - EINTR [channels.c] - unbreak, ok niels@ [sshd.c] - unlink pid file, ok niels@ [auth2.c] - Add missing #ifdefs; ok - markus --- sshd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index fc2d1d20e..70f292cc7 100644 --- a/sshd.c +++ b/sshd.c @@ -14,7 +14,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.111 2000/04/27 08:01:28 markus Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.113 2000/05/01 20:34:51 markus Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -190,6 +190,7 @@ sigterm_handler(int sig) { log("Received signal %d; terminating.", sig); close_listen_socks(); + unlink(options.pid_file); exit(255); } @@ -729,7 +730,7 @@ main(int ac, char **av) * fail if there already is a daemon, and this will * overwrite any old pid in the file. */ - f = fopen(SSH_DAEMON_PID_FILE, "w"); + f = fopen(options.pid_file, "w"); if (f) { fprintf(f, "%u\n", (unsigned int) getpid()); fclose(f); -- cgit v1.2.3