3 int copy_fd(int ifd, int ofd)
9 len = read(ifd, buffer, sizeof(buffer));
18 return error("copy-fd: read returned %s",
19 strerror(read_error));
22 int written = write(ofd, buf, len);
30 return error("copy-fd: write returned 0");
31 if (errno == EAGAIN || errno == EINTR)
33 return error("copy-fd: write returned %s",