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.
In my setup when invoking `ssh -q -o ControlPath=none -tt -o
"RemoteCommand=bin/sh -i" <host>` seems to be creating a tty and that tty
is also set to canonical mode. If I then feed it two nested shells it
looses output. A simple example of this is:
Then some amount of the sent data which should be printed by the `cat` gets
lost. Throwing in some `stty`'s here and there seems to reveal that the tty
does actually remain in canonical mode when the subshells are invoked, so
I'm actually a bit confused why there are problems here.
It's the pipe to a shell instance that's forced interactive. If that shell
were reading from a tty in icanon mode, the kernel would break lines at
the tty eol character (newline). That much seems clear.
--
``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/