bug-bash
[Top][All Lists]
Advanced

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

Re: Stdin read-ahead in Emacs mode


From: Chet Ramey
Subject: Re: Stdin read-ahead in Emacs mode
Date: Mon, 27 Oct 2025 15:29:06 -0400
User-agent: Mozilla Thunderbird

On 10/25/25 1:16 PM, Rudi Horn wrote:

Essentially I wasn't aware that the kernel's TTY driver is supposed to split reads into lines, which in theory should make everything work. The problem was coming from the fact that emacs / TRAMP launches a shell inside a shell inside a shell. The first shell is launched with `/bin/sh -i`, then within that shell `INSIDE_EMACS` etc. is set and readline is disabled when launching subsequent nested shells.

From what I can tell, the problem is then that the first shell sets the TTY to raw mode when invoking the second shell. This shell is then non- interactive and does not use readline, which causes it to read ahead.

This is the part I don't get. It's not bash that sets the shell to raw
mode, since there's not a tty in the mix, so it must be something in how
it's invoked, or another program that sets the terminal modes and then
execs bash.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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