close(j); (void)open("/dev/null", j == 0 ? O_RDONLY : O_RDONLY); 
close(j); (void)open("/dev/null", j == 0 ? O_RDONLY : O_RDONLY); 
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);// dont this is required:    getsid(0);/*     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/48e01716aaaac8b8e40f560b441b614f2c9cc537/crmutils.c/clean/crm/common/crmutils.c