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

cant working on windows subsystem #4

Open
b23r0 opened this issue Aug 30, 2022 · 1 comment
Open

cant working on windows subsystem #4

b23r0 opened this issue Aug 30, 2022 · 1 comment

Comments

@b23r0
Copy link

b23r0 commented Aug 30, 2022

I discovered conpty cant working when set #![windows_subsystem = "windows"]. the following code will get the bug。

Error Message : Windows error : Invalid handle

#![windows_subsystem = "windows"]

use std::io::Write;
fn main() {
    let proc = match conpty::spawn("cmd.exe"){
        Ok(p) => p,
        Err(e) => {
            let mut f = std::fs::File::create("error.txt").unwrap();
            f.write_all(format!("{}" ,e).as_bytes()).unwrap();
            f.flush().unwrap();
            return;
        },
    };
    proc.wait(None).unwrap();
}
@zhiburt
Copy link
Owner

zhiburt commented Dec 24, 2022

SORRY @b23r0

I don't know exactly how, but I've noticed the issue probably only a week ago.

BIG Thank you for reproducible.

I was actually not aware about this mode #![windows_subsystem = "windows"].
So its interesting one.

It must be addressed with 0.4.
Could you verify it?

Take care.
Merry Christmas and Happy New Year.

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

No branches or pull requests

2 participants