Ticket #2975 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

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

Changed 4 years ago by simonmar

  • status changed from new to closed
  • difficulty set to Unknown
  • resolution set to fixed
  • milestone set to 6.10.2

Thanks for the report. This one is already fixed:

Fri Nov 14 13:05:46 GMT 2008  Simon Marlow <marlowsd@gmail.com>
  * Don't put stdin into non-blocking mode (#2778, #2777)
Note: See TracTickets for help on using tickets.