[erlang-questions] has anyone else seen Erlang 19 break 'bash' after exit?

Matthias Lang matthias@REDACTED
Mon Mar 13 21:32:30 CET 2017


Hi,

Erlang 19.1 and 19.2 seems to break something to do with terminal
input on some but not all of my Debian x86-64 machines. I took a quick
look through the recent mailing list archives and haven't seen any
mention of this. Maybe I missed it. Maybe it's just me.

Example:

   | ~ >uname -a
   | Linux hec 4.9.0-2-amd64 #1 SMP Debian 4.9.13-1 (2017-02-27) x86_64 GNU/Linux
   | ~ >read x
   | hello world
   | ~ >erl
   | Erlang/OTP 19 [erts-8.1] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
   |
   | Eshell V8.1  (abort with ^G)
   | 1>
   | BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
   |        (v)ersion (k)ill (D)b-tables (d)istribution
   | a
   | ~ >read x
   | bash: read: read error: 0: Resource temporarily unavailable

The "read error: 0: Resource temporarily unavailable" part is unexpected.
Using 'cat' instead of 'read' produces a similar error:

   | cat: -: Resource temporarily unavailable

'strace' tells me something is screwy about stdin:

   | read(0, 0x7f1010dbb000, 131072)         = -1 EAGAIN (Resource temporarily unavailable)

read(2) tells me EAGAIN suggests that stdin has been left in with O_NONBLOCK.
Is that Erlang's problem to clean up, or is that supposed to happen on
program exit? I haven't read up on that.

Doing the same thing on 17.4 works fine.

Debian 3.16.39-1 and erts-8.2.1 produces a related by different strangeness:

   | 1>
   | BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
   |       (v)ersion (k)ill (D)b-tables (d)istribution
   | a
   | $ sh: turning off NDELAY mode

Can anyone else see this? Any idea what's up?

Matt



More information about the erlang-questions mailing list