chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix another problem with receiving signals


From: Felix
Subject: Re: [Chicken-hackers] [PATCH] Fix another problem with receiving signals while read()ing
Date: Mon, 05 Nov 2012 20:46:25 +0100 (CET)

From: Peter Bex <address@hidden>
Subject: [Chicken-hackers] [PATCH] Fix another problem with receiving signals 
while read()ing
Date: Sat, 3 Nov 2012 21:56:38 +0100

> Hi all,
> 
> Today I noticed an intermittent failure in the scsh-process tests.
> After some debugging, it turned out that my last patch for
> fast_read_string_from_file() was incomplete; if we receive a signal
> while reading and nothing has been read yet, fread() will return
> exactly 0 bytes and set an error condition due to EINTR.
> fast_read_string_from_file will then take the branch in library.scm:125:
> 
> ...
> } else if (ferror (fp)) {
>   if (0 == m) {
>     return C_SCHEME_FALSE;
>   }
> }
> ...
> 
> This will not clear the error.  I think this extra case at the start
> is just mistaken, and should be ripped out.  Attached is a patch which
> does exactly that.  This should simplify the function to be more
> understandable.  I've also taken the opportunity to replace some of
> those evil []-style brackets with proper parentheses ;)

Signed off and pushed.


cheers,
felix



reply via email to

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