diff options
Diffstat (limited to 'sys-process/dcron/files/dcron-3.2-pidfile.patch')
-rw-r--r-- | sys-process/dcron/files/dcron-3.2-pidfile.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sys-process/dcron/files/dcron-3.2-pidfile.patch b/sys-process/dcron/files/dcron-3.2-pidfile.patch new file mode 100644 index 000000000000..9ef687746909 --- /dev/null +++ b/sys-process/dcron/files/dcron-3.2-pidfile.patch @@ -0,0 +1,20 @@ +write out a pidfile + +--- dcron/main.c ++++ dcron/main.c +@@ -120,8 +120,14 @@ + perror("fork"); + exit(1); + } +- if (pid > 0) ++ if (pid > 0) { ++ FILE *fp; ++ if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) { ++ fprintf(fp, "%d\n", pid); ++ fclose(fp); ++ } + exit(0); ++ } + } + + /* |