On Thu Aug 20 14:45:57 2026 +0000, Paul Gofman wrote:
I didn't imply otherwise. I was just pointing at another potential issue. as the current cmd code sets the Std handles with the potentially redirected streams, it doesn't look right that we reuse the O_TEXT bit that could have been set by cmd's father. I'll dig a bit more into it. As far as my tests and patch here goes, what cmd.exe currently does passing the CRT std fds flags to lpReserved2 is going to be a no-op anyway. In fact, I so far don't see any reasonable way at all how a process can force the fd flags for child's std fds. And cmd's own std fds are going to have default O_TEXT, regardless of what was in the caller. I thought about that a bit when making this patch and didn't immediately see why it would introduce the issue for cmd if ucrtbase behaves like that on Windows (unless I am still missing some condition under which the parent's std stream text attribute can actually be inherited).
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/11710#note_149408