On Tue Sep 30 20:07:07 2025 +0000, Alexandre Julliard wrote:
It doesn't have to be done lazily (but it can be of course). The point is that there's no reason to do it in the very first request, particularly since that differs between the first and subsequent threads. Just add another request to retrieve it somewhere during thread init.
The problem with retrieving an fd during thread init, and the reason I moved it to create_thread request, is that it triggers a deadlock with some kernel32 test terminating a thread quickly after having created it. I had opened https://gitlab.winehq.org/wine/wine/-/merge_requests/8878 to fix it, which I can reopen, but the discussions there seemed to indicate that it was unlikely to be accepted.