| 1234567891011121314151617181920212223242526272829 |
- --- scheduler/main.c.orig 2003-05-01 19:58:28.000000000 +0200
- +++ scheduler/main.c 2003-05-03 18:54:34.000000000 +0200
- @@ -222,6 +222,25 @@
-
- chdir("/");
-
- + /*
- + * Write PID file
- + */
- +#ifdef PID_FILE
- + {
- + mode_t old_umask;
- + pid_t pid;
- + FILE *fp;
- +
- + old_umask = umask((mode_t) 0022);
- + pid = getpid();
- + if ((fp = fopen(PID_FILE, "w")) == NULL)
- + syslog(LOG_ERR, "cannot write PID file '%s'", PID_FILE);
- + fprintf(fp, "%ld\n", (long)pid);
- + fclose(fp);
- + umask(old_umask);
- + }
- +#endif
- +
- #ifndef DEBUG
- /*
- * Disable core dumps...
|