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

dup'ing stdout is detectable on Windows #34

Open
dra27 opened this issue Jun 10, 2021 · 1 comment
Open

dup'ing stdout is detectable on Windows #34

dra27 opened this issue Jun 10, 2021 · 1 comment

Comments

@dra27
Copy link
Member

dra27 commented Jun 10, 2021

In order to guarantee no output from the solver when verbosity is switched off, we have:

https://github.com/AltGr/ocaml-mccs/blob/b46f1df8d9ef9dfe7c153cc10198a0b1ff2fca36/src/glpk_solver.cpp#L76-L79

followed by:

https://github.com/AltGr/ocaml-mccs/blob/b46f1df8d9ef9dfe7c153cc10198a0b1ff2fca36/src/glpk_solver.cpp#L127-L130

This operation is undetectable on Unix but detectable on Windows, because it invalidates the underlying console handle. Detected in ocaml/opam#4710. It's fixed more reliably there, but I think it would be better to ensure that the patched GLPK, etc. never leaks by improving the verbosity checking rather than preventing the handle from being used.

@kit-ty-kate
Copy link
Contributor

Related to #50

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