Ticket #2975 (closed bug: fixed)
GHCi's :edit command calls the editor with stdin in nonblocking mode
| Reported by: | kaol | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.10.2 |
| Component: | GHCi | Version: | 6.10.1 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | Difficulty: | Unknown | |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
