23 lines
498 B
Diff
23 lines
498 B
Diff
|
--- src/misc.c.orig
|
||
|
+++ src/misc.c
|
||
|
@@ -293,6 +293,8 @@ void acquire_daemonlock(int closeflag) {
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
+ if(NoFork == 1) return; //move along, nothing to do here..
|
||
|
+
|
||
|
if (fd == -1) {
|
||
|
pidfile = _PATH_CRON_PID;
|
||
|
/* Initial mode is 0600 to prevent flock() race/DoS. */
|
||
|
--- src/cron.c.orig
|
||
|
+++ src/cron.c
|
||
|
@@ -600,7 +600,7 @@ static void sigchld_handler(int x) {
|
||
|
}
|
||
|
|
||
|
static void quit(int x) {
|
||
|
- (void) unlink(_PATH_CRON_PID);
|
||
|
+ if(NoFork == 0) unlink(_PATH_CRON_PID);
|
||
|
_exit(0);
|
||
|
}
|
||
|
|