[erlang-questions] "New" vs. "old" console behavior: bug or feature?

Ignas Vyšniauskas baliulia@REDACTED
Thu Apr 25 10:02:41 CEST 2013

Hi Scott, Fred,

On 04/23/2013 09:36 PM, Scott Lystig Fritchie wrote:
> The io:format/3 call in session #2 will behave differently if session
> #1's "run_erl" command runs with a tty/pseudo-tty or without.
> A. With a tty/pty: The io:format() call returns immediately. B.
> Without a tty/pty: The io:format() call will hang indefinitely. It
> will remain blocked until the Erlang term parser in session #1 has
> returned.  For example, finishing the term with "term2}." and then
> pressing ENTER.

Thank you for pointing this out! I've been seeing this fairly often
(specifically in the combination with lager that you mentioned) and
never figured out what caused it.

On 04/24/2013 03:46 PM, Fred Hebert wrote:
> - If it's not possible to boot the tty used by 'user_drv', it should
> fall-back to 'user.erl' as an IO leader.

So how does Erlang determine whether TTY is available? Currently I've
worked around this by forcing a `SHELL=screen` variable in the boot
script and it seems to do the trick, but I don't really like this
approach. Any suggestions?


More information about the erlang-questions mailing list