mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
On Windows, closing a pipe while another thread waited for it in select terminated the process. The close releases the host handle before the C runtime descriptor, so in between: - the readiness query of the pipe failed on the dead handle and threw 'querying pipe descriptor ... failed'; - after that, DescriptorIsOpen still saw the descriptor mapped, select looked it up again, found no known kind and threw 'is neither a socket, a pipe, ...'. QueryPipe now reports a descriptor whose handle is no longer a pipe as not a pipe instead of throwing, DescriptorIsOpen on Windows also checks that the mapped handle is still valid, and select answers EBADF for such a descriptor before throwing for an unknown kind, as FreeBSD 11.4's kern_select does for a descriptor closed during the wait. Co-Authored-By: Claude Opus 5.5 <[email protected]>