Pty tinkering #378

Closed
wants to merge 3 commits into
from

Projects

None yet

2 participants

@glance-

Fix redefine-MOSH-IP issue
Simplify some in the code. Cleanup some left fd's.

glance- added some commits Jan 17, 2013
@glance- glance- Close some leftover fd's 884b80b
@glance- glance- Have ssh close stdin and forceallocate pty
Somehow we still need to have a real pty on stdin to ssh so
window-size-thingie works.
4976eff
@glance- glance- Replace IO::Pty with pipe
Now when we don't need some fancy pty for sending on window-size and
reading proxy-output from, just use a regular pipe to drop dependency on
IO::Pty
3fa71d7
@keithw
Mosh (mobile shell) member

Getting rid of IO::Pty is fantastic! We can remove the dependency from our Debian and Fedora packages and this will help a lot of people (maybe even Cygwin).

My questions are:

  • Is ssh -tt available on every conceivable version of OpenSSH? Maybe we should check when it was introduced.
  • Should we worry that anybody will have "resize" (or any other stdin-reading process) in their startup dotfiles? Doing ssh -n will cause anything that wants a terminal to stop working.
@keithw keithw added a commit that closed this pull request Jan 18, 2013
@glance- glance- Replace IO::Pty with pipe
Now when we don't need some fancy pty for sending on window-size and
reading proxy-output from, just use a regular pipe to drop dependency on
IO::Pty

[closes #378]
74e1a30
@keithw keithw closed this in 74e1a30 Jan 18, 2013
@glance-

Oldest openssh i found that i could test against was a old 3.7.1p1, that was released 17-Sep-2003, and that worked as expected, so i don't think we need to bother thinking about older openssh's.

If you have eg. "resize" in your startup-scripts, it will try to read stdin for 10 seconds and then fail with a:
"resize: Time out occurred"
And after that everything runs as normal.

If you have a "resize" in your .bashrc and that is invoked by non interactive shells you are doing it wrong and should wrap that statement with something that checks if you are running a intractive shell:

if [ ! -z "$PS1" ] ; then
 eval `resize`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment