aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2014-01-28 15:08:52 +0100
committerHans Nilsson <[email protected]>2014-01-28 15:08:52 +0100
commit6de916efa8df952ca1e24cccda673134982c0da0 (patch)
tree7e66b325ac2093b661b7c69394cd6ff989d7de77
parente0001b1311dc3182793e21f598dabf15053aead7 (diff)
parent16aae9d538c8ed3c47a021c7ab10ff9f99231b7e (diff)
downloadotp-6de916efa8df952ca1e24cccda673134982c0da0.tar.gz
otp-6de916efa8df952ca1e24cccda673134982c0da0.tar.bz2
otp-6de916efa8df952ca1e24cccda673134982c0da0.zip
Merge branch 'hans/ssh/tty_geometry_delay/OTP-10732'
-rw-r--r--lib/ssh/src/ssh_cli.erl15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl
index 41febf9707..77453e8fd7 100644
--- a/lib/ssh/src/ssh_cli.erl
+++ b/lib/ssh/src/ssh_cli.erl
@@ -170,10 +170,19 @@ handle_msg({Group, get_unicode_state}, State) ->
{ok, State};
handle_msg({Group, tty_geometry}, #state{group = Group,
- pty = #ssh_pty{width=Width,
- height=Height}
+ pty = Pty
} = State) ->
- Group ! {self(),tty_geometry,{Width,Height}},
+ case Pty of
+ #ssh_pty{width=Width,height=Height} ->
+ Group ! {self(),tty_geometry,{Width,Height}};
+ _ ->
+ %% This is a dirty fix of the problem with the otp ssh:shell
+ %% client. That client will not allocate a tty, but someone
+ %% asks for the tty_geometry just before every erlang prompt.
+ %% If that question is not answered, there is a 2 sec timeout
+ %% Until the prompt is seen by the user at the client side ...
+ Group ! {self(),tty_geometry,{0,0}}
+ end,
{ok,State};
handle_msg({Group, Req}, #state{group = Group, buf = Buf, pty = Pty,