> Date: Thu, 21 Feb 2013 09:39:50 -0800 > From: Paul Eggert <egg...@cs.ucla.edu> > CC: Andy Wingo <wi...@pobox.com>, bonz...@gnu.org, bug-gnulib@gnu.org > > On 02/21/13 09:36, Eli Zaretskii wrote: > >> Otherwise, full_read sets errno to 0 if it returns a length less than > >> > the length we asked for > > Where does it do that? I don't think I see this. Maybe I'm blind. > > No, it's just hard to see. > > It's the line "errno = ZERO_BYTE_TRANSFER_ERRNO;" in full-write.c, > assuming that the problem is merely an EOF.
Ah, OK, it's because of the loop in full_rw, which will try reading again after returning too few bytes. Makes sense.