log_d("writetochild: fd=%d, opp=%d, bytestowrite=%d, r=%d", p->pfd, p->opp, bytestowrite, r);
log_d("writetochild: %d %d %d %d", p->pfd, p->opp, bytestowrite, r);
static int writetochild(struct pipe_params *p){	size_t bytestowrite;	ssize_t r;	bytestowrite = p->ibp - p->opp;	if (bytestowrite == 0) {		log_d("writetochild: bytestowrite is zero!");		return 0;	}	r = send(p->pfd, p->ibuf + p->opp, bytestowrite, 0);	if (debug)		log_d("writetochild: fd=%d, opp=%d, bytestowrite=%d, r=%d", p->pfd, p->opp, bytestowrite, r);	switch (r) {	case -1:		if (errno == EAGAIN)			return 0;		lerror("writetochild");		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;}