if (p->client_output.end > p->client_output.start)
if (p->output.end > p->output.start)
static int childisfinished(struct pipe_params *p){	if (p->script_input.state != 3)		return 0;	if (p->client_output.end > p->client_output.start)		return 0;	if (p->script_input.end > p->script_input.start)		return 0;	if (p->client_input.state == 1 && p->imax)		return 0;	return 1;}