This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: read() cant read files larger than 2.1 gig on a 64 bit system
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-help at sourceware dot org
- Cc: glide creme <glidecreme at gmail dot com>
- Date: Sat, 26 Dec 2009 11:58:41 -0500
- Subject: Re: read() cant read files larger than 2.1 gig on a 64 bit system
- References: <431f8c1a0912251330l266dd23blae9d425b65e04162@mail.gmail.com> <431f8c1a0912251434j731e5d88gee7637661a7feed1@mail.gmail.com>
On Friday 25 December 2009 17:34:18 glide creme wrote:
> bytes_read = read(fd, data, bytes_expected);
>
> if (bytes_read != bytes_expected)
> err(EX_DATAERR, "Read only %lu of %lu bytes",bytes_read, bytes_expected);
a short read is not an error. please read the documentation.
-mike