Skip to content

iex doesn't reset terminal blocking flag when it exits #9805

@rlipscombe

Description

@rlipscombe

Environment

  • Elixir & Erlang/OTP versions (elixir --version):
Erlang/OTP 22 [erts-10.6.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]

Elixir 1.10.0 (compiled with Erlang/OTP 21)
  • Operating system: Ubuntu 18.04.4

Current behavior

$ iex -S mix
Erlang/OTP 22 [erts-10.6.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]

Compiling [...snip...]
Interactive Elixir (1.10.0) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 
BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded
       (v)ersion (k)ill (D)b-tables (d)istribution
^C$ perl -MFcntl -e 'print(fcntl(STDIN, F_GETFL, 0) & O_NONBLOCK)'
2048$ 

(terminal's broken; "git add -p" and "apt-get install" both quit; see the explanation at https://askubuntu.com/questions/509852/why-does-apt-get-abort-by-itself-as-though-id-pressed-n/1206244#1206244)

Expected behavior

$ perl -MFcntl -e 'print(fcntl(STDIN, F_GETFL, 0) & O_NONBLOCK)'
0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions