-
Notifications
You must be signed in to change notification settings - Fork 7
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
winpty-rs
unexpectedly replaces current process IO
#49
Comments
Hi @rivy, streams are being opened again in case the parent process has done any kind of redirection, i.e., on a CI session: winpty-rs/src/pty/conpty/pty_impl.rs Line 71 in 88977d9
winpty-rs/src/pty/conpty/pty_impl.rs Line 140 in 88977d9
However, the examples are designed to print the output from the PTY: winpty-rs/src/examples/conpty.rs Line 23 in 88977d9
In this case, then the problem would be related to the output redirection on the parent process, rather from the PTY. Could you please confirm if the same situation arises when running the tests? |
@andfoy , thanks for the reply. Ultimately, I'm trying to use this crate to drive an external executable (specifically, I'm reading lots of material, but I'm not sure that I grasp all the subtleties of how to drive such a process. From readings, it looks like I might need to open the PseudoConsole using I/O pipes and possibly use the ref: Intro to WinOS PseudoConsole To answer your question, |
Thanks for the linked issue @rivy, according to the issue on ConPTY, we can try to add |
When running the example
conpty_example
, the executables IO handles look to be replaced by the PTY handles.Output should not be displayed.
When experimenting with the example, all output prior to the PTY creation+spawn is pushed through the original IO handles, but everything after is pushed through the PTY.
Does this have to be created in some other way to avoid polluting the original IO handles?
The text was updated successfully, but these errors were encountered: