On 11/18/22 01:11, Alexandre Julliard (@julliard) wrote:
That causes problems, e. g., with libuv (used, e. g., by Vampire Survivors). It checks stdout handle type and if it is pipe it tries to do SetNamedPipeHandleState() on it and does not tolerate the failure.
It looks more sensible to me to report all the pipes and sockets created through wine_server_fd_to_handle() as regular files as that matches the server objects we have for them. When that is not the case we should get the correct type from server fd type.
I'm not sure that reporting a regular file is a good idea. Next we'll find an app that assumes that it supports SetFilePointer() and the like...
Maybe we can call it FILE_DEVICE_UNKNOWN? I guess it reflects the state of things best, we will get FILE_TYPE_CHAR in GetFileType() and the fd flagged as TTY in msvcrt.