corrected PID file usage

This commit is contained in:
john30
2016-02-20 13:50:58 +01:00
parent 928fa61504
commit aa582a7b32
+2 -2
View File
@@ -435,7 +435,7 @@ void daemonize()
} }
} }
if (pidFile == NULL) { if (pidFile == NULL) {
logError(lf_main, "can't open pidfile: " PID_FILE_NAME); logError(lf_main, "can't open pidfile: %s", opt.pidFile);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
@@ -448,7 +448,7 @@ void closePidFile()
if (fclose(pidFile) != 0) if (fclose(pidFile) != 0)
return; return;
remove(PID_FILE_NAME); remove(opt.pidFile);
} }
} }