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); + } } /*