rem: if (signal(SIGALRM, sig_alarm_kill) == SIG_ERR ) {
add: if (set_sig_h(SIGALRM, sig_alarm_kill) == SIG_ERR ) {
context: void handle_sigs(){	pid_t	chld;	int	chld_status;	switch(sig_flag){		case 0: break; /* do nothing*/		case SIGPIPE:				/* SIGPIPE might be rarely received on use of				   exec module; simply ignore it				 */				LOG(L_WARN, "WARNING: SIGPIPE received and ignored\n");				break;		case SIGINT:		case SIGTERM:			/* we end the program in all these cases */			if (sig_flag==SIGINT)				DBG("INT received, program terminates\n");			else				DBG("SIGTERM received, program terminates\n");							/* first of all, kill the children also */			kill_all_children(SIGTERM);			     /* Wait for all the children to die */			while(wait(0) > 0);						cleanup(1); /* cleanup & show status*/			dprint("Thank you for flying " NAME "\n");			exit(0);			break;					case SIGUSR1:#ifdef STATS			dump_all_statistic();#endif#ifdef PKG_MALLOC			LOG(memlog, "Memory status (pkg):\n");			pkg_status();#endif#ifdef SHM_MEM			LOG(memlog, "Memory status (shm):\n");			shm_status();#endif			break;					case SIGCHLD:			while ((chld=waitpid( -1, &chld_status, WNOHANG ))>0) {				if (WIFEXITED(chld_status)) 					LOG(L_INFO, "child process %d exited normally,"							" status=%d\n", chld, 							WEXITSTATUS(chld_status));				else if (WIFSIGNALED(chld_status)) {					LOG(L_INFO, "child process %d exited by a signal"							" %d\n", chld, WTERMSIG(chld_status));#ifdef WCOREDUMP					LOG(L_INFO, "core was %sgenerated\n",							 WCOREDUMP(chld_status) ?  "" : "not " );#endif				}else if (WIFSTOPPED(chld_status)) 					LOG(L_INFO, "child process %d stopped by a"								" signal %d\n", chld,								 WSTOPSIG(chld_status));			}#ifndef STOP_JIRIS_CHANGES			if (dont_fork) {				LOG(L_INFO, "INFO: dont_fork turned on, living on\n");				break;			} 			LOG(L_INFO, "INFO: terminating due to SIGCHLD\n");#endif			/* exit */			kill_all_children(SIGTERM);			if (signal(SIGALRM, sig_alarm_kill) == SIG_ERR ) {				LOG(L_ERR, "ERROR: could not install SIGALARM handler\n");				/* continue, the process will die anyway if no				 * alarm is installed which is exactly what we want */			}			alarm(60); /* 1 minute close timeout */			while(wait(0) > 0); /* wait for all the children to terminate*/			signal(SIGALRM, sig_alarm_abort);			cleanup(1); /* cleanup & show status*/			alarm(0);			signal(SIGALRM, SIG_IGN);			DBG("terminating due to SIGCHLD\n");			exit(0);			break;				case SIGHUP: /* ignoring it*/					DBG("SIGHUP received, ignoring it\n");					break;		default:			LOG(L_CRIT, "WARNING: unhandled signal %d\n", sig_flag);	}	sig_flag=0;}