initial import
[patches.git] / dcron-3.2-pidfile.patch
1 write out a pidfile
2
3 --- dcron/main.c
4 +++ dcron/main.c
5 @@ -120,8 +120,14 @@
6 perror("fork");
7 exit(1);
8 }
9 - if (pid > 0)
10 + if (pid > 0) {
11 + FILE *fp;
12 + if ((fp = fopen("/var/run/cron.pid", "w")) != NULL) {
13 + fprintf(fp, "%d\n", pid);
14 + fclose(fp);
15 + }
16 exit(0);
17 + }
18 }
19
20 /*