Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

uv_spawn: PTY support #573

Closed
piscisaureus opened this issue Oct 4, 2012 · 3 comments
Closed

uv_spawn: PTY support #573

piscisaureus opened this issue Oct 4, 2012 · 3 comments

Comments

@piscisaureus
Copy link

Add an option to uv_spawn to open a PTY.

Example code of how to create a pty can be found in node 0.4 and pty.js.

Open questions/problems:

  • Do we define a separate uv_pty_t, or can we piggyback this onto uv_pipe_t?
  • Typically you wouldn't want to open multiple ptys; instead you'd attach fd 0-2 all to the same pty. There currently is no room in the API for that.
  • There is no way to do this on Windows. Do we make it return UV_ENOSYS, or do we just create pipes?
@Sharpie
Copy link

Sharpie commented Oct 30, 2012

There is no way to do this on Windows. Do we make it return UV_ENOSYS, or do we just create pipes?

One interesting workaround on the Windows side:

https://github.com/rprichard/winpty

A bit clunky as it spawns a new process that tries to generate a PTY stream by scraping a hidden console window. More discussion and alternative approaches can be found on the Cygwin mailing list.

Maybe not a solution that is solid enough to build into libuv proper---but perhaps good enough to leave an opening for those who can live with the limitations.

@rikarends
Copy link

+1 Need this to use vanilla node for serving terminals. No binary extensions!

@saghul
Copy link
Contributor

saghul commented Nov 26, 2014

Closing old stalled issues, please reopen at https://github.com/libuv/libuv if still needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants