public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Karl Dahlke <eklhad@comcast.net>, mpatocka@redhat.com
Cc: gregkh@linuxfoundation.org, jslaby@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3.12] Broken terminal due to echo bufferring
Date: Tue, 10 Dec 2013 06:00:57 -0500	[thread overview]
Message-ID: <52A6F469.9020109@hurleysoftware.com> (raw)
In-Reply-To: <20131110054819.eklhad@comcast.net>

On 12/10/2013 05:48 AM, Karl Dahlke wrote:
> | An involved discussion about race conditions and asynchronous events,
> | which is beyond me.
> | Please continue; I'm sure you will figure it out,
> | and perhaps educate me along the way.
> | But this thread began with the following program that revealed,
> | I believe, the same echo crlf bug that I pointed out.
>
>> #include <stdio.h>
>> #include <unistd.h>
>>
>> int main(void)
>> {
>> int c;
>> while ((c = getchar()) != EOF) {
>> if (c == '\n') write(1, "prompt>", 7);
>> }
>> return 0;
>> }
>
> Peter sent me a patch which fixed my bug, in its console switch form.
> And also seemed to fix the bug whenever I was in a cooked mode program.
> So I was happy.
> For grins I compiled this program, to see if it also
> ran properly.
> It does, while it is running.
> Prompt and newline come out in sequence, in order,
> and everything looks right.
> Hit control d, for EOF, as the program expects, and all is well.
> But hit ^c for interrupt, and as Tilly says,
> "All hell done broke loose now."
> The tty spills out a bunch of accumulated text that it has displayed in the past.
> Don't know where it comes from, or why.
> I ran the program several times, interrupt,
> and the same thing happened each time, even the same stored output,
> as though it were a 4k block that was retained from somewhere.
> Try it and see (with Peter's latest patches).

Hi Karl,

That's happening because you're also running the 'tty: Fix ^C echo' patch
series which pre-dates this fix and is _not_ compatible with it.

I've already asked Greg to drop that series for other reasons (which he
had planned on anyway).

Regards,
Peter Hurley


  reply	other threads:[~2013-12-10 11:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-09  2:55 [PATCH 3.12] Broken terminal due to echo bufferring Mikulas Patocka
2013-12-09  4:26 ` Karl Dahlke
2013-12-09 15:43 ` Peter Hurley
2013-12-09 22:18   ` Mikulas Patocka
2013-12-10  0:01     ` Peter Hurley
2013-12-10  2:29       ` Mikulas Patocka
2013-12-10 10:48         ` Karl Dahlke
2013-12-10 11:00           ` Peter Hurley [this message]
2013-12-10 10:52         ` Karl Dahlke
2013-12-10 14:34         ` Peter Hurley
2013-12-11 16:29           ` Mikulas Patocka
2013-12-13 21:24             ` Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52A6F469.9020109@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=eklhad@comcast.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpatocka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox