-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Windows: stdout/stderr on --subsystem windows
#9486
Comments
I think stdout failure is ok, but we should not use stderr when it does not exist. Seems that haskell redirects to "debug console". |
cc #3309 since this is related to logging system: logger should not assume stderr is always available, and it should provide other way in the case. |
For comparison, C++ on windows without the console, cout and printf will continue to work fine, happily accepting your output without erroring. |
Looks like this had been fixed. |
[`unnecessary_lazy_eval`] Do not lint in external macros fix rust-lang/rust-clippy#9485, fix rust-lang/rust-clippy#9439 I didn't find a way to add a test since fps occur due to an external crate. changelog: [`unnecessary_lazy_eval`] Do not lint in external macros
--subsystem windows
means the program does not have console, and_write(1, ...)
will return -1 with errnoEBADF
.So at fd_t::write()
if nout < 0 as IoRet
is triggered, anderror!()
andfail!()
are called.However, while printing error,
_write(2, ...)
also returns -1 andfd_t::write()
raises another error. It causes segfault:The text was updated successfully, but these errors were encountered: