for (j=0; j < 3; ++j) { 
for (j=0; j < 3; ++j) { 
register_pid(const char *pid_file, gboolean do_fork, void (*shutdown)(int nsig)){    int	j;    long	pid;    FILE *	lockfd;    if (do_fork) {		pid = fork();				if (pid < 0) {			cl_log(LOG_CRIT, "cannot start daemon");			exit(LSB_EXIT_GENERIC);		}else if (pid > 0) {			exit(LSB_EXIT_OK);		}    }        lockfd = fopen(pid_file, "w");    if (lockfd == NULL) {		cl_log(LOG_CRIT, "cannot create pid file: %s", pid_file);		exit(LSB_EXIT_GENERIC);    }else{		pid = getpid();		fprintf(lockfd, "%ld\n", pid);		fclose(lockfd);    }    umask(022);/*     if (!crm_debug()) { *//* 	cl_log_enable_stderr(FALSE); *//*     } */    for (j=0; j < 3; ++j) {		close(j);		(void)open("/dev/null", j == 0 ? O_RDONLY : O_RDONLY);    }    CL_IGNORE_SIG(SIGINT);    CL_IGNORE_SIG(SIGHUP);    CL_SIGNAL(SIGTERM, shutdown);}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/1527bd277bea88314ec7c1fafa964969da82ef38/crmutils.c/clean/crm/common/crmutils.c