[125] in Pthreads mailing list archive
Re: (f)read problem
daemon@ATHENA.MIT.EDU (Ronald Wahl)
Thu Sep 14 10:51:10 1995
Date: Thu, 14 Sep 1995 16:07:45 +0200 (MET DST)
From: Ronald Wahl <Ronald.Wahl@Informatik.TU-Chemnitz.DE>
To: Rich Salz <rsalz@osf.org>
Cc: pthreads@MIT.EDU
In-Reply-To: <9509141358.AA06007@sulphur.osf.org>
On Thu, 14 Sep 1995, Rich Salz wrote:
> > it's probably normal that I got sometimes less than
> > 4096 bytes --> I have to read again from the socket.
>
> Not if you are using fread. The whole point of fread is that it
> does the buffering. If you get less then you asked for, then you
> can safely assume that you've hit EOF. Sounds like there might be
> a pthreads bug here.
Both read _and_ fread have this behavior.
Ronald
+-------------------------------------------------------------------+
| Ronald Wahl rwa@informatik.tu-chemnitz.de |
| >> PGP key available by finger << http://www.tu-chemnitz.de/~row |
+-------------------------------------------------------------------+
| PGP fingerprint: 9D 4A 66 7C A9 9F 6A 5F 90 45 D5 0C DF E5 CB 71 |
+-------------------------------------------------------------------+