diff svr-main.c @ 323:3bfbe95f9a14

Add -P pidfile patch from Swen Schillig
author Matt Johnston <matt@ucc.asn.au>
date Wed, 07 Jun 2006 14:10:21 +0000
parents 7dad470ad4aa
children b66a00272a90
line wrap: on
line diff
--- a/svr-main.c	Wed Jun 07 13:41:19 2006 +0000
+++ b/svr-main.c	Wed Jun 07 14:10:21 2006 +0000
@@ -146,7 +146,7 @@
 	}
 
 	/* 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);
@@ -189,7 +189,7 @@
 		val = select(maxsock+1, &fds, NULL, NULL, &seltimeout);
 
 		if (exitflag) {
-			unlink(DROPBEAR_PIDFILE);
+			unlink(svr_opts.pidfile);
 			dropbear_exit("Terminated by signal");
 		}