xwrite
if (xwrite(dest->fd, dest->buf, dest->nextc - dest->buf) < 0)
int xwrite(int, const char *, int);
xwrite(pip[1], p + written, len - written);