[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc-fortran
Subject:    Re: [patch, libgfortran] PR46800 Handle CTRL-D correctly with STDIN
From:       Janne Blomqvist <blomqvist.janne () gmail ! com>
Date:       2014-03-17 13:40:33
Message-ID: CAO9iq9EW-L4PLTjmr63Ov8e3yTXSUGf6DNC-gPZz6nMaDzq6WQ () mail ! gmail ! com
[Download RAW message or body]

On Mon, Mar 17, 2014 at 12:50 AM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all.
>
> The problem here was that when reading a value from STDIN and the user just
> entered an empty entry (LF),
> we would end up getting nested into a second read (via next_char) and the user
> would have to press CTRL-D twice to get out of the read. (The correct behavior
> is to only hit CTRL-D once which sends us the EOF.
>
> This was caused by a call to eat_separator right after we did the initial read.
>  The eat_separator function then tries to read again and we get a condition of
> waiting for user input on that read.  The patch eliminates this call to
> eat_separator. This requires explicitly checking for the comma and end-of-line
> conditions which are also done in eat_separator.
>
> Regression tested on x86-64-gnu.  No test case can be done since it require
> terminal input to read.
>
> OK for trunk?

Ok, thanks for the patch.

I wonder, would it be possible to set up some dejagnu testcases with
multiple programs communicating via pipes or such, we occasionally
seem to have regressions dealing with non-seekable files/terminals and
such which go undetected for a long time, since we're not regularly
testing it?

-- 
Janne Blomqvist
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic