p->pollno = -1; p->rpollno = -1;
void init_child(struct connection *p, int fd){	struct request *r;	size_t bytestomove, bytestoshift;	r = p->r;	p->client_input.start = p->client_input.end = p->client_input.floor;	p->output.start = p->output.end = p->output.floor;	p->script_input.start = p->script_input.end = p->script_input.floor;	p->script_input.state = 1;	p->pipe_params.state = 0;	if (p->rfd != -1)		abort();	p->rfd = fd;	p->pipe_params.chunkit = r->protocol_minor > 0;	p->pipe_params.nocontent = r->method == M_HEAD;	p->pipe_params.haslen = 0;	p->pipe_params.pmax = 0;	if (r->method == M_POST) {		p->client_input.state = 1;		p->pipe_params.imax = r->in_mblen;		bytestomove = p->header_input.end - p->header_input.middle;		if (bytestomove > p->pipe_params.imax) {			bytestoshift = p->pipe_params.imax;			bytestomove = p->pipe_params.imax;		} else			bytestoshift = 0;		if (bytestomove) {			if (p->client_input.start + bytestomove > p->client_input.ceiling) {				log_d("init_child: script buffer too small!");				close(fd);				close_connection(p);				return;			}			memmove(p->client_input.start, p->header_input.middle, bytestomove);			p->client_input.end += bytestomove;			p->pipe_params.imax -= bytestomove;			if (bytestoshift)				p->header_input.middle += bytestoshift;			else				p->header_input.end = p->header_input.middle;		}	} else {		p->client_input.state = 0;		p->pipe_params.imax = 0;	}	set_connection_state(p, HC_FORKED);	p->pollno = -1;	p->rpollno = -1;}