for (j = 1; j < SIGMAX; j++) { for (i = 0; signum_to_initialize[i]; i++) { if (signum_to_initialize[i] == j) { goto sig_next; } }  for (i = 0; signum_to_ignore[i]; i++) { if (signum_to_ignore[i] == j) { goto sig_next; } } pthread_signal(j, SIG_DFL);  #if defined(HAVE_SYSCALL_SIGACTION) || defined(HAVE_SYSCALL_KSIGACTION) sigaction(j, &act, NULL); #else signal(j, sig_handler_real); #endif  sig_next:; }  #if defined BROKEN_SIGNALS signal(SIGCHLD, sig_handler_real); #endif
void sig_init(void){	int sig_to_init[] = { SIGVTALRM, SIGALRM, 0 };#if defined(SA_RESTART)	struct sigaction act;#endif	int i;#if defined(SA_RESTART)	act.sa_handler = sig_handler_real;	sigemptyset(&(act.sa_mask));	act.sa_flags = SA_RESTART;#endif	/* Initialize only the necessary signals */	for (i = 0; sig_to_init[i]; i++) {#if defined(SA_RESTART)		if (sigaction(sig_to_init[i], &act, NULL)) {#else		if (signal(sig_to_init[i], sig_handler_real)) { #endif			PANIC();		}	}}