summaryrefslogtreecommitdiffhomepage
path: root/svr-main.c
diff options
context:
space:
mode:
Diffstat (limited to 'svr-main.c')
-rw-r--r--svr-main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/svr-main.c b/svr-main.c
index e06eb5e..a14c6e6 100644
--- a/svr-main.c
+++ b/svr-main.c
@@ -28,6 +28,7 @@
#include "buffer.h"
#include "signkey.h"
#include "runopts.h"
+#include "random.h"
static size_t listensockets(int *sock, size_t sockcount, int *maxfd);
static void sigchld_handler(int dummy);
@@ -145,7 +146,7 @@ void main_noinetd() {
}
/* create a PID file so that we can be killed easily */
- pidfile = fopen(DROPBEAR_PIDFILE, "w");
+ pidfile = fopen(svr_opts.pidfile, "w");
if (pidfile) {
fprintf(pidfile, "%d\n", getpid());
fclose(pidfile);
@@ -188,7 +189,7 @@ void main_noinetd() {
val = select(maxsock+1, &fds, NULL, NULL, &seltimeout);
if (exitflag) {
- unlink(DROPBEAR_PIDFILE);
+ unlink(svr_opts.pidfile);
dropbear_exit("Terminated by signal");
}