Paul Eggert wrote on Wed, Aug 05, 2020:
> On 8/5/20 11:47 AM, Nikos Tsipinakis wrote:
> >Can you elaborate? I can't find a code path that loses the errno.
> 
> full_read reads a partial block and then tries to read again. The
> second read fails with errno == EIO. full_read then returns the
> number of bytes successfully read, and the caller ignores errno.

Hm, no?

if the second read fails with EIO then at that point in the loop ret < 0
and full_read returns -1.
There is a risk that errno get overwritten by dbgfprintf though, it
should reassign errno = saved_errno before returning, but at the very
least some error will bubble up as Nikos said.

-- 
Dominique

Reply via email to