rem: for(r=0;r<addresses_no;r++){
add: for(r=0;r<sock_no;r++){
context: int main_loop(){	int r, i;	pid_t pid;	/* one "main" process and n children handling i/o */	if (dont_fork){#ifdef STATS		setstats( 0 );#endif		/* only one address */		if (udp_init(&addresses[0],port_no)==-1) goto error;		/* we need another process to act as the timer*/		if (timer_list){				process_no++;				if ((pid=fork())<0){					LOG(L_CRIT,  "ERRROR: main_loop: Cannot fork\n");					goto error;				}								if (pid==0){					/* child */					/* timer!*/					process_bit = 0;					for(;;){						sleep(TIMER_TICK);						timer_ticker();					}				}else{						pids[process_no]=pid; /*should be shared mem anway*/				}		}		/* main process, receive loop */		is_main=1;		pids[0]=getpid();		process_bit = 1;		process_no=0; /*main process number*/				     /* We will call child_init even if we		      * do not fork		      */		if (init_child(0) < 0) {			LOG(L_ERR, "init_child failed\n");			goto error;		}				return udp_rcv_loop();	}else{		for(r=0;r<addresses_no;r++){			/* create the listening socket (for each address)*/			if (udp_init(&addresses[r], port_no)==-1) goto error;			for(i=0;i<children_no;i++){				if ((pid=fork())<0){					LOG(L_CRIT,  "main_loop: Cannot fork\n");					goto error;				}				if (pid==0){					     /* child */					if (init_child(i) < 0) {						LOG(L_ERR, "init_child failed\n");						goto error;					}					process_no=i+1; /*0=main*/					process_bit = 1 << i;#ifdef STATS					setstats( i );#endif					return udp_rcv_loop();				}else{						pids[i+1]=pid; /*should be in shared mem.*/				}			}			/*parent*/			/*close(udp_sock)*/; /*if it's closed=>sendto invalid fd errors?*/		}	}	/*this is the main process*/	pids[process_no]=getpid();	process_bit = 0;	is_main=1;	if (timer_list){		for(;;){			/* debug:  instead of doing something usefull */			/* (placeholder for timers, etc.) */			sleep(TIMER_TICK);			/* if we received a signal => TIMER_TICK may have not elapsed*/			timer_ticker();		}	}else{		for(;;) sleep(LONG_SLEEP);	}		/*return 0; */ error:	return -1;}