[erlang-questions] Remote shell and terminfo

Ameretat Reith ameretat.reith@REDACTED
Tue Nov 10 15:57:42 CET 2015


I faced strange things with different values in TERM environment variable
and
remote_shell.  First, If I try open a remote shell with a defined terminfo
-understood by installed version of ncurses- I get a crash:

```
$ TERM=xterm erl -remsh nodename Erlang R16B03 (erts-5.10.4) [source]
[64-bit] [smp:8:8] [async-threads:10] [kernel-poll:false]

*** ERROR: Shell process terminated! (^G to start new job) ***
```

Which I thought may be because of different versions of running erts (7.0)
and
that tries to make remote shell (5.10.4),  but I can make a remote shell If
I
set TERM to something garbage:

```
$ TERM=screen-blah-blah erl -remsh nodename Eshell V5.10.4  (abort with ^G)
1> proplists:get_value(max_fds, erlang:system_info(check_io)).
1024
```

Using same Erlang version as provided in made release by `relx` and using
start
scripts,  I can make remote console with or without known terminfo:

```
$ TERM=screen-blah-blah /path/to/rel/bin/start remote_console
Eshell V7.0 (abort with ^G)
(remsh2a0a97fb-nodename@REDACTED:247)1>
proplists:get_value(max_fds, erlang:system_info(check_io)).
1024
```

And things get funny...

```
$ TERM=xterm /path/to/rel/bin/start remote_console
Erlang/OTP 18 [erts-7.0] [source] [64-bit] [smp:8:8] [ds:8:8:10]
[async-threads:10] [hipe]
[kernel-poll:false]

Eshell V7.0  (abort with ^G)
(nodename@REDACTED:247)1> proplists:get_value(max_fds,
erlang:system_info(check_io)).
262144
```

I get different maximum file descriptor limit with different terminfo.
Looks
like last one is not really a connected remote shell..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20151110/16b3f899/attachment.htm>


More information about the erlang-questions mailing list