Ticket #1417 (closed proposal: fixed)

Opened 6 years ago

Last modified 5 years ago

Add pseudoterminal support to the unix package

Reported by: bos@… Owned by:
Priority: normal Milestone: Not GHC
Component: libraries/unix Version: 6.6.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I propose to enhance the unix package by adding pty support:

-- | @openPseudoTerminal@ creates a pseudoterminal (pty) pair, and -- returns the newly created pair as a (@master@, @slave@) tuple. openPseudoTerminal :: IO (Fd, Fd)

-- | @getSlaveTerminalName@ calls @ptsname@ to obtain the name of the -- slave terminal associated with a pseudoterminal pair. The file -- descriptor to pass in must be that of the master. getSlaveTerminalName :: Fd -> IO FilePath?

This is all that's required to get pseudoterminals working on Unix-like systems.

Attachments

unix-pty.patch Download (8.6 KB) - added by bos@… 6 years ago.

Change History

Changed 6 years ago by bos@…

Changed 6 years ago by bos@…

The code ought to work on Linux, Solaris, BSD, and HP/UX. Probably Cygwin, too. However, I've only been able to compile-test it on Linux.

Changed 6 years ago by simonmar

No objection in principle; the code does stuff I don't understand so I won't claim to have fully reviewed it though.

Changed 5 years ago by igloo

  • status changed from new to closed
  • resolution set to wontfix

This proposal seems to be abandoned

Changed 5 years ago by bos

  • status changed from closed to reopened
  • resolution wontfix deleted

Changed 5 years ago by bos

  • status changed from reopened to closed
  • resolution set to fixed

This was actually shipped in, I think, 6.8.1.

Changed 5 years ago by simonmar

  • architecture changed from Unknown to Unknown/Multiple

Changed 5 years ago by simonmar

  • os changed from Unknown to Unknown/Multiple
Note: See TracTickets for help on using tickets.