[uClibc]patch: Loop on EINTR in stdio

Manuel Novoa III mjn3 at uclibc.org
Thu Jun 7 13:38:35 UTC 2001


On Thu, Jun 07, 2001 at 12:36:08PM +0200, Johan Adolfsson wrote:
> The following patch (indentation lost) will loop
> on EINTR in _uClibc_fread (used by fread, fgets etc.)
> glibc does that and without it I believe error handling 
> from fgets() etc. is hard or impossible
> to handle properly.

Agreed.

> At least I had trouble with earlier version of uC-libc when
> reading from a pipe to a program - when the program exists,
> you may get an EINTR and you sometimes looses the last
> bytes.
> 
> Does anyone see any problem with this solution?

No problem.  I just committed it to cvs.  Thanks.

Manuel





More information about the uClibc mailing list