p->cpollno = n++;
p->pollno = n++;
int setup_child_pollfds(int n){	struct pipe_params *p;	short e;	p = busy_pipes.head;	while (p) {		if (p->cn && p->error_condition == 0) {			e = 0;			if (p->client_input.state == 1 && p->client_input.end < p->client_input.ceiling && p->imax)				e |= POLLIN;			if (p->client_output.end > p->client_output.start || (p->state == 2 && p->script_input.start < p->script_input.end && p->client_output.end == p->client_output.floor))				e |= POLLOUT;			if (e) {				pollfds[n].fd = p->cfd;				pollfds[n].events = e;				p->cpollno = n++;			} else				p->cpollno = -1;			e = 0;			if (p->script_input.state == 1 && p->script_input.end < p->script_input.ceiling && (p->chunkit || p->haslen == 0 || p->pmax))				e |= POLLIN;			if (p->client_input.end > p->client_input.start)				e |= POLLOUT;			if (e) {				pollfds[n].fd = p->pfd;				pollfds[n].events = e;				p->ppollno = n++;			} else				p->ppollno = -1;		}		p = p->next;	}	return n;}