Read no more than BUF_SIZE bytes from the file associated with the file descriptor inputFd into the array of characters at the address specified by buf and save the number of bytes actually read in numRead.
If numRead is greater than 0, write those bytes from buf to the file file associated with the file descriptor outputFd and return the number of bytes written.
If the number of bytes written is not the same as the number of bytes read do whatever the function fatal() does.
Repeat steps 1, 2, and 3 until read has no more data to read (in which case it returns 0) or detects an error (in which case it returns -1).