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