Re: [BUG?] tty doesn't handle ^D at cooked/non-cooked switchingcorner case

From: Alan Cox
Date: Tue Dec 30 2008 - 08:44:31 EST


On Tue, 30 Dec 2008 21:00:23 +0900 (JST)
KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:

> Hi tty expert,
>
> Recently, ruby (scripting program language) developing group found
> that linux doesn't handle ^D properly at cooked/non-cooked switching
> corner case.

I don't believe the behaviour of input characters typed across that
boundary is defined by the standards at all. That said I think the
behaviour you expect is reasonable.

> They create following patch. is it right way?

You could recompute minimum in this case but zero is definitely
incorrect. I think what you would actually need to do is to extract out
the code just below do_it_again: which computes minimum and recompute it
properly.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/