ocaml-mccs icon indicating copy to clipboard operation
ocaml-mccs copied to clipboard

dup'ing stdout is detectable on Windows

Open dra27 opened this issue 4 years ago • 1 comments

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 https://github.com/ocaml/opam/pull/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.

dra27 avatar Jun 10 '21 14:06 dra27

Related to https://github.com/ocaml-opam/ocaml-mccs/pull/50

kit-ty-kate avatar Dec 18 '23 23:12 kit-ty-kate