-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
portable-pty example not working properly on Windows #1396
Comments
I think I have the same problem on Windows server 2019. |
wez
added a commit
that referenced
this issue
Aug 12, 2022
This breaking API change allows us to explicitly generate EOF when the taken writer is dropped. The examples have been updated to show how to manage read, write and waiting without deadlock for both linux and windows. Need to confirm that this is still good on macOS, but my confidence is high. I've also removed ssh2 support from this crate as part of this change. We haven't used it directly in wezterm in a long while and removing it from here means that there is slightly less code to keep compiling over and over. refs: #2392 refs: #1396
I've made a couple of changes in master and updated the example. I haven't published this version to crates.io yet. https://github.com/wez/wezterm/blob/main/pty/examples/whoami.rs |
wez
added a commit
that referenced
this issue
Aug 20, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(I omittedthe bug report form as this issue concerns
portable-pty
)I noticed that
portable-pty
behaves very differently on Windows.When running the whoami example, no outpud is read, and the child exits with an error code:
This is the output:
I found that it only works when waiting for the child before reading:
But this is problematic because this makes it directly impossible to handle very long-running commands (e.g a python or node script that infinitely runs something on interval). It's easier to handle such a case through the reader directly with either a timeout or a limit of characters/lines to read.
So first of all it seems either there's an issue with
portable_pty
or with the windows computer I have.Hopefully you have an idea of what's happening, thanks :)
The text was updated successfully, but these errors were encountered: