GHCi's :edit command calls the editor with stdin in nonblocking mode
When using editline support, GHCi sets stdin to nonblocking mode.
withReadline = bracket_ stopTimer (do startTimer; setNonBlockingFD 0
-- Two problems are being worked around here:
-- 1. readline sometimes puts stdin into blocking mode,
-- so we need to put it back for the IO library
Most editors expect that stdin is in blocking mode and nothing in the code sets the mode that way and the editor inherits the mode via system
call in editFile
, when using :edit
.
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |