FILE *pf;
pid_t pid;
int mask;
-
+
+ if ( !debug ) {
mask = umask(022);
/* check for pid. this can get fooled by stale pid's. */
if ((pf = fopen(pidfile, "r"))) {
/*
* Disassociate from controlling tty.
*/
- if ( !debug ) {
+
int i;
getitimer(ITIMER_PROF, &itimer);
fclose(pf);
return pid;
}
- }
fprintf(pf, "%d\n", getpid());
fclose(pf);
+ }
+
return 0;
}