[erlang-questions] Line wrapping issue when attaching to running node
Tue Dec 23 16:00:57 CET 2014
We are experiencing an annoying problem in integration or production environment that deals with incorrect line wrapping when connecting to a remote shell.
Erlang/OTP 17 [erts-6.2] [source] [64-bit] [smp:4:4] [async-threads:10] [kernel-poll:false]
Installed on FreeBSD using the `erlang-17.3_3,3` package.
We generate a release using rebar. When we want to interact with it, we attach to the system like so (assuming the release is named “abc”) :
$ ./rel/abc/bin/abc attach
In this situation, whenever you write something that exceeds the width of the terminal (typically 80 columns), the line wraps onto a second line, which is OK. But if you have an open parenthesis on the first line, that is closed on the second line, then the output becomes garbled, text overwritten and it is no longer possible to sanely use the shell.
This is an example of expected output:
, 2, 3, 4], another_arg).
And the actual output (the cursor is on the first line at column 2):
, 2, 3, 4]
Text garbling occurs as soon as I hit the first ‘]’. It also occurs on ‘)’.
It does not happen when typing into an erlang shell that was launched using `erl` directly.
It seems to happen to_erl. The same erratic behaviour is seen when attach to a release running on FreeBSD or OS X. It does not matter whether the console is running locally or via SSH. Also, it does not seem to matter wether the TERM variable is set to ansi, vt100, xterm or xterm-256color.
I would like to know if someone noticed this problem, and how to fix it.
More information about the erlang-questions