Ticket #2975 (closed bug: fixed)
GHCi's :edit command calls the editor with stdin in nonblocking mode
|Reported by:||kaol||Owned by:|
|Type of failure:||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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.