A subtle property of Unix is that the kernel may choose to leave an I/O operation incomplete, returning a smaller number of bytes than you requested, or simply giving up with the error EINTR, if it is simply more "convenient". The full_io routines look lik normal Unix read and write operations, but silently retry through temporary failures. Of course, these routines may still fail for more permanent reasons such as end of file or disk full.
#include <sys/types.h>
#include <stdio.h>
#include "int_sizes.h"
Go to the source code of this file.
Functions | |
ssize_t | full_read (int fd, void *buf, size_t count) |
Read the next bytes from a file descriptor. | |
ssize_t | full_write (int fd, const void *buf, size_t count) |
Write the next bytes to a file descriptor. | |
ssize_t | full_pread (int fd, void *buf, size_t count, off_t offset) |
Read arbitrary bytes from a file descriptor. | |
ssize_t | full_pwrite (int fd, const void *buf, size_t count, off_t offset) |
Write arbitrary bytes to a file descriptor. | |
INT64_T | full_pread64 (int fd, void *buf, INT64_T count, INT64_T offset) |
Read arbitrary bytes from a file descriptor. | |
INT64_T | full_pwrite64 (int fd, const void *buf, INT64_T count, INT64_T offset) |
Write arbitrary bytes to a file descriptor. | |
ssize_t | full_fread (FILE *file, void *buf, size_t count) |
Read the next bytes from a file stream. | |
ssize_t | full_fwrite (FILE *file, const void *buf, size_t count) |
Write the next bytes to a file stream. |
|
Read the next bytes from a file descriptor.
|
|
Write the next bytes to a file descriptor.
|
|
Read arbitrary bytes from a file descriptor.
|
|
Write arbitrary bytes to a file descriptor.
|
|
Read arbitrary bytes from a file descriptor. (64 bit)
|
|
Write arbitrary bytes to a file descriptor. (64 bit)
|
|
Read the next bytes from a file stream.
|
|
Write the next bytes to a file stream.
|