Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ptys work with a shim library, but are missing lots of pieces #323

Closed
cgull opened this issue May 5, 2016 · 6 comments
Closed

ptys work with a shim library, but are missing lots of pieces #323

cgull opened this issue May 5, 2016 · 6 comments
Labels

Comments

@cgull
Copy link

cgull commented May 5, 2016

I don't know why I went to the effort, but I coded up a forkpty solib shim to get ptys working. (Only later did I realize that something like this Android openpty would have likely worked almost immediately.)

Doing this revealed that the pty implementation itself actually functions, but appears to be incomplete; almost all termios functionality is missing and pty-related ioctls do not work as expected (see the README.md for more details, and note that the shim and ptys work correctly on a Linux kernel). Still, the shim is useful to start checking functionality with programs that use ptys. With this shim, ptys are almost usable for programs that use them non-interactively (like apt-get) but not so good for interactive usage where you'd want things like input echo, interrupts, and window resizing (like script).

I don't think I'm telling the Microsoft team much they don't already know, but this might be useful for other people trying Bash-on-Windows.

@russalex russalex added the bug label May 6, 2016
@russalex
Copy link
Contributor

russalex commented May 6, 2016

Thanks for the write-up and the shim!

We are fast at work on our pty support. Talking with the dev working in the are and we are in the process of testing some changes to light up the real forkpty/openpty/login_tty.

As always, no promise on when it will get in, but this one is near the top of our priority list.

@cgull
Copy link
Author

cgull commented Jun 9, 2016

This seems to be largely resolved in 14361 and that shim is now redundant; I've tried mosh, several X11 terminals and dropbear, and I haven't yet found anything that fails to open ptys. xterm in particular amazes me, its pty code is a horrible archaic mess and I thought it would be a long time before that worked.

@vilicvane
Copy link

@russalex I have a question (might be silly), will pty support available for Windows apps? I am gathering information about writing a terminal emulator (though that's not what I am familiar with).

@sunilmut
Copy link
Member

@vilic - Interesting idea, but that's something that is totally outside of WSL. Even our user-voice page does not seem like a right fit for it. If you are aware of other ways of providing feature requests for Windows, this would be a good candidate there.

@vilicvane
Copy link

@sunilmut Good to know there's people like this idea, though certainly I am not aware of better ways to provide feature requests. I'll try vscode, as they've added terminal using pty.js (backed by winpty) on Windows, maybe they want that too.

@cgull
Copy link
Author

cgull commented Aug 3, 2016

This was pretty much fixed in 14361, closing.

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

No branches or pull requests

4 participants