bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: full_read depends on incoming errno


From: Paul Eggert
Subject: Re: full_read depends on incoming errno
Date: Thu, 21 Feb 2013 09:20:03 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/21/13 09:16, Paolo Bonzini wrote:
> I think usually errno is undefined for return values other than -1

That's true for system calls, but full_read is
different in that it sets errno whenever it returns
a value other than the requested size.  That way,
the caller can distinguish a short read due to EOF
from a short read due to I/O error.  So Andy's code
should be OK.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]