Aug. 20, 2026
3:50 p.m.
so if no one temper the std handles directly, the fd=0,1,2 should be in sync with the std values (both in parent and child)
Yes, I tested that additionally and it just gets inherited. I also was the one to temper std handles directly in this testing after _dup2(fd, 1) before spawn() and it is the same on WIndows and Wine with my patches: the file set in SetStdHandle() is inherited to GetStdHandle(), the CRT stdout handle is different and what was set through fd = open() / _dupd2(fd, 1). So looks like my second patch is correct without further changes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11710#note_149412