return run_command(centry, "-r", TRUE); 
/* * We need to ensure that the exec will succeed before * we bother forking.  We don't want to respawn something that * won't exec in the first place. */  if (access(centry->path, F_OK|X_OK) != 0) { cl_perror("Cannot (access) exec %s", centry->path); return FALSE; }  s_res = stat(centry->command, &buf); if(s_res != 0) { cl_perror("Cannot (stat) exec %s", centry->command); return FALSE; }   /* We need to fork so we can make child procs not real time */ switch(pid=fork()) {  case -1: cl_log(LOG_ERR, "start_a_child_client: Cannot fork."); return FALSE;  default:	/* Parent */ centry->pid = pid; return TRUE;  case 0:		/* Child */ break; }  /* Child process:  start the managed child */ cl_make_normaltime(); setpgid(0,0);  /* Limit peak resource usage, maximize success chances */ if (centry->shortrcount > 0) { alarm(0); sleep(1); }  cmd_with_options[size] = 0;  cl_log(LOG_INFO, "Executing \"%s\" (pid %d)", centry->command, (int) getpid());  if(CL_SIGINTERRUPT(SIGALRM, 0) < 0) { cl_perror("Cannot set interrupt for child process %s", centry->command); }else{ const char *	devnull = "/dev/null"; unsigned int	j; struct rlimit		oflimits; CL_SIGNAL(SIGCHLD, SIG_DFL); alarm(0); CL_IGNORE_SIG(SIGALRM);  /* A precautionary measure */ getrlimit(RLIMIT_NOFILE, &oflimits); for (j=0; j < oflimits.rlim_cur; ++j) { close(j); } (void)devnull;  (void)open(devnull, O_RDONLY);	/* Stdin:  fd 0 */ (void)open(devnull, O_WRONLY);	/* Stdout: fd 1 */ (void)open(devnull, O_WRONLY);	/* Stderr: fd 2 */  (void)execl("/bin/sh", "sh", "-c", centry->command, (const char *)NULL);  /* Should not happen */ cl_perror("Cannot exec %s", centry->command); } /* Suppress respawning */ exit(100);   return TRUE; 
start_subsystem(struct crm_subsystem_s*	centry){	cl_log(LOG_INFO, "Starting sub-system \"%s\"", centry->command);	if (centry->pid != 0) {		cl_log(LOG_ERR, "OOPS! client %s already running as pid %d"		       ,	centry->command, (int) centry->pid);	}	return run_command(centry, "-r", TRUE);}
8182	/local/tlutelli/issta_data/temp/c/2005_temp/2005/8182/3970fd79a5e8f087994f48e1fff12a6cf40072c8/subsystems.c/buggy/crm/crmd/subsystems.c