mread.c File Reference
#include "common.h"
#include "bio.h"
#include "bu/log.h"
Include dependency graph for mread.c:

Go to the source code of this file.


long int bu_mread (int fd, void *bufp, long int n)

Detailed Description

multiple-read to fill a buffer

Provide a general means to a read some count of items from a file descriptor reading multiple times until the quantity desired is obtained. This is useful for pipes and network connections that don't necessarily deliver data with the same grouping as it is written with.

If a read error occurs, a negative value will be returns and errno should be set (by read()).

Definition in file mread.c.