rem: int i, j, n, stat;
add: int i, n, stat;
context: void xjab_check_workers(int mpid){	int i, j, n, stat;	DBG("XJAB:%d:xjab_check_workers: time=%d\n", mpid, get_ticks());	if(!jwl || jwl->len <= 0)		return;	for(i=0; i < jwl->len; i++)	{		if(jwl->workers[i].pid <= 0)			continue;				stat = 0;		n = waitpid(jwl->workers[i].pid, &stat, WNOHANG);		if(n == 0)			continue;				LOG(L_ERR,"XJAB:xjab_check_workers: worker[%d][pid=%d] has exited"			" - status=%d err=%d errno=%d\n", i, jwl->workers[i].pid, 			stat, n, errno);		if(n==jwl->workers[i].pid)		{			DBG("XJAB:%d:xjab_check_workers: create a new worker\n", mpid);			xj_wlist_send_info(jwl, i);			xj_wlist_set_pid(jwl, -1, i);			if ( (stat=fork())<0 )			{				DBG("XJAB:xjab_check_workers: error - cannot launch worker\n");				return;			}			if (stat == 0)			{				if(xj_wlist_set_pid(jwl, getpid(), i) < 0)				{					DBG("XJAB:xjab_check_workers: error setting worker's pid\n");					return;				}				xj_worker_process(jwl,jaddress,jport,i,db_con[i]);				exit(0);			}		}		else		{			LOG(L_ERR, "XJAB:xjab_check_workers: error - worker[%d][pid=%d] lost"				" forever\n", i, jwl->workers[i].pid);			xj_wlist_set_pid(jwl, -1, i);		}	}			}