[Pkg-shadow-devel] Bug#476519: Bug#476519: shell-mode garbles input

Chet Ramey chet.ramey at case.edu
Fri May 2 16:50:49 UTC 2008


Stephane Chazelas wrote:
[...]
> 
> Could be a tty setting as well.
> 
> stty min 0 time 10 -icanon
> 
> could reproduce that if bash was built without readline I think.
> With readline, bash is meant to reset those min and time
> parameters before each prompt. Maybe it fails to do so in which
> case strace will tell you as well.

You beat met to it. :-)  Does this happen only in an emacs shell-mode
window?  If that is the case, then readline doesn't enter into the
picture -- bash disables line editing when it can tell it's being run
by emacs -- and uses read(2).  read can return failure right away
(-1/EAGAIN) or 0 (no data available) if it's called with the tty in
non-canonical mode and those tty settings.  Either value will be
translated to EOF and cause the shell to exit.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet at case.edu    http://cnswww.cns.cwru.edu/~chet/





More information about the Pkg-shadow-devel mailing list