#2975: GHCi's :edit command calls the editor with stdin in nonblocking mode
-----------------------------+----------------------------------------------
Reporter: kaol | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 6.10.1 | Severity: normal
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
-----------------------------+----------------------------------------------
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}}}.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2975>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs