if (debug) log_d("writetochild: fd=%d, opp=%d, ibp=%d, r=%d", p->pfd, p->opp, p->ibp, r);
static int writetochild(struct pipe_params *p){	ssize_t r;	r = send(p->pfd, p->ibuf + p->opp, p->ibp - p->opp, 0);	switch (r) {	case -1:		switch (errno) {		case EAGAIN:			break;		default:			lerror("pipe_run: error writing to script");		case EPIPE:		case ECONNRESET:			p->error_condition = STUB_ERROR_PIPE;			return -1;		}		break;	default:		p->t = current_time;		p->opp += r;		if (p->opp == p->ibp)			p->opp = p->ibp = 0;		break;	}	return 0;}