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: Tue, 19 Feb 2013 12:19:38 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/19/13 11:05, Andy Wingo wrote:
> We use full_read in Guile and just got a bug report that full_read was
> depending on the incoming errno.

Sorry, I don't see the bug here.  The calling
code should look like this:

   size_t r = full_read (fd, buf, n);
   if (r != n)
     {
        if (errno == 0)
          handle_end_of_file ();
        else
          handle_error (errno);
     }

Is this how Guile works?  If not, then it should probably
be changed to work like that.  If so, then can you explain
what the bug is, from Guile's point of view?



reply via email to

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