read_close(3)
limb manual
read_close(3)
NAME
read_close - read a file into memory and close it
SYNOPSIS
#include <limb/djbunix.h>
ssize_t read_close(char *dst, size_t dlen, int fd)
DESCRIPTION
The read_close() function reads the entire content of the file associated with
file descriptor fd and places it into the memory pointed by dst, up to a
maximum of dlen bytes.
RETURN VALUE
On success, the read_close() function returns the number of bytes read and
copied into memory. Otherwise, it returns -1 and sets errno to indicate the
error.
ERRORS
The read_close() function may fail and set errno for any of the errors
described for allread(3).