1

what is the name of this piece of code

view story
linux-howto

http://www.unix.com – Code: while ((numRead = read(inputFd, buf, BUF_SIZE)) > 0) if (write(outputFd, buf, numRead) != numRead) fatal("couldn't write whole buffer"); if (numRead == -1) errExit("read"); if (close(inputFd) == -1) errExit("close input"); if (close(outputFd) == -1) errExit("close output"); exit(EXIT_SUCCESS); since: Code: #ifndef BUF_SIZE #define BUF_SIZE 1024 #endif ssize_t numRead; char buf[BUF_SIZE]; inputFd = open(argv[1], O_RDONLY); outputFd = open(argv[2], openFlags, filePerms); I need to understand the while loop :D (HowTos)