/[gentoo-x86]/sys-process/dcron/files/dcron-3.2-pidfile.patch
Gentoo

Contents of /sys-process/dcron/files/dcron-3.2-pidfile.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Wed Oct 4 21:33:51 2006 UTC (7 years, 9 months ago) by vapier
Branch: MAIN
CVS Tags: HEAD
Version bump.
(Portage version: 2.1.2_pre2)

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 /*

  ViewVC Help
Powered by ViewVC 1.1.20