This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
Re: problems with read()
- To: cygwin at cygwin dot com
- Subject: Re: problems with read()
- From: Christopher Faylor <cgf at redhat dot com>
- Date: Mon, 22 Jan 2001 22:16:41 -0500
- References: <v04210106b692974bf0a1@[64.13.5.209]>
- Reply-To: cygwin at cygwin dot com
On Mon, Jan 22, 2001 at 09:34:40PM -0500, David Johnson wrote:
>I'm seeing weird problems with read()
>
>Below is a simple program that open()'s a file and read()'s 4K at a
>time until the entire file is read. Opening the file with different
>paths seems to produce the problem while other paths have no problem.
>
>The first read to the file returns 20-40 bytes of the file and then
>each read after that returns 0 bytes of the file.
Open the file with the O_BINARY option:
fd = open(filename, O_RDONLY | O_BINARY);
cgf
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple