CL_IGNORE_SIG(SIGINT); CL_IGNORE_SIG(SIGHUP); 
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);	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/6249014ace0bf0fb62f582636f8fafaad85f4a4a/crmutils.c/clean/crm/common/crmutils.c