blob: b35ccbd99b5c477a64a2280d49ec6b9ec6763df9 (
plain) (
tree)
|
|
#include <stdio.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "filecopy.h"
#include "error.h"
void filecopy(int ifd, int ofd)
{
ssize_t n;
char buff[BUFSIZ];
while ((n = read(ifd, buff, BUFSIZ)) > 0)
if (write(ofd, buff, n) != n)
error("cat: write error");
}
|