Skip to content

detect_family_inner may block indefinietely #1287

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

Closed
ChrisDenton opened this issue Nov 13, 2024 · 0 comments · Fixed by #1288
Closed

detect_family_inner may block indefinietely #1287

ChrisDenton opened this issue Nov 13, 2024 · 0 comments · Fixed by #1288

Comments

@ChrisDenton
Copy link
Member

ChrisDenton commented Nov 13, 2024

This line can, in certain situations, block indefinitely

cc-rs/src/tool.rs

Lines 161 to 167 in a0441c3

let accepts_cl_style_flags = run(Command::new(path).arg("-?"), path, &{
// the errors are not errors!
let mut cargo_output = cargo_output.clone();
cargo_output.warnings = cargo_output.debug;
cargo_output.output = OutputKind::Discard;
cargo_output
})

If cl.exe detects there's a console then it will paginate its output, prompting the user to press enter to continue. This is a problem when cargo_output.debug is set to true because then we will forward stderr to what may, potentially, be a console handle.

Easiest fix is probably to set .stdin to Stdio::null() so cl.exe always knows there's no input to wait for.

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

Successfully merging a pull request may close this issue.

1 participant