diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$OpenBSD: sshd.c,v 1.111 2000/04/27 08:01:28 markus Exp $"); | 17 | RCSID("$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); |