summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sshd.c b/sshd.c
index fc2d1d20e..70f292cc7 100644
--- a/sshd.c
+++ b/sshd.c
@@ -14,7 +14,7 @@
14 */ 14 */
15 15
16#include "includes.h" 16#include "includes.h"
17RCSID("$OpenBSD: sshd.c,v 1.111 2000/04/27 08:01:28 markus Exp $"); 17RCSID("$OpenBSD: sshd.c,v 1.113 2000/05/01 20:34:51 markus Exp $");
18 18
19#include "xmalloc.h" 19#include "xmalloc.h"
20#include "rsa.h" 20#include "rsa.h"
@@ -190,6 +190,7 @@ sigterm_handler(int sig)
190{ 190{
191 log("Received signal %d; terminating.", sig); 191 log("Received signal %d; terminating.", sig);
192 close_listen_socks(); 192 close_listen_socks();
193 unlink(options.pid_file);
193 exit(255); 194 exit(255);
194} 195}
195 196
@@ -729,7 +730,7 @@ main(int ac, char **av)
729 * fail if there already is a daemon, and this will 730 * fail if there already is a daemon, and this will
730 * overwrite any old pid in the file. 731 * overwrite any old pid in the file.
731 */ 732 */
732 f = fopen(SSH_DAEMON_PID_FILE, "w"); 733 f = fopen(options.pid_file, "w");
733 if (f) { 734 if (f) {
734 fprintf(f, "%u\n", (unsigned int) getpid()); 735 fprintf(f, "%u\n", (unsigned int) getpid());
735 fclose(f); 736 fclose(f);