read(2) System Calls Manual read(2) read - (libc -lc) #include ssize_t read(size_t count; int fd, void buf[count], size_t count); read() count fd buf. . read() . count read() . read() read() count 0 . POSIX.1 count SSIZE_MAX <<>> . ( ) . ( ) read() . NOTES. -1 errno . ( ) . EAGAIN fd (O_NONBLOCK) . open(2) O_NONBLOCK. EAGAIN EWOULDBLOCK fd (O_NONBLOCK) . POSIX.1-2001 . EBADF fd . EFAULT buf . EINTR signal(7). EINVAL fd O_DIRECT buf count . EINVAL fd timerfd_create(2) read() timerfd_create(2) . EIO I/O. SIGTTIN . I/O . EIO . Lost locks fcntl(2) . EISDIR fd . fd. POSIX.1-2008. SVr4 4.3BSD POSIX.1-2001. read() ( ) 0x7ffff000 (2,147,479,552) . ( 32-bit 64-bit.) NFS . NFS st_atime ( ) st_atime . UNIX . POSIX.1-2008/SUSv4 XSI 2.9.7 (<< >>): (atomic) POSIX.1-2008 : ... read() readv(2). () . 3.14 : ( open(2)) read() ( readv(2)) I/O ( ) . 3.14. close(2), fcntl(2), ioctl(2), lseek(2), open(2), pread(2), readdir(2), readlink(2), readv(2), select(2), write(2), fread(3) 3 . . : . 6.18 8 2026 read(2)