You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In posix_close(), posix_read() and posix_close(), when the socket operation returns an error, we need to distinguish whether it was really a file operation or a true error. Why does WSANOTINITIALISED fall into calling the file function? If the fd was a socket and winsock was not initialized, that should just call wsa_errno(). I think WSAEBADF is only returned if the socket handle is bad. But if it's a file handle, it returns WSAENOTSOCK. So I think the only time we can safely call file operations is if WSAENOTSOCK is returned.
In
posix_close()
,posix_read()
andposix_close()
, when the socket operation returns an error, we need to distinguish whether it was really a file operation or a true error. Why does WSANOTINITIALISED fall into calling the file function? If the fd was a socket and winsock was not initialized, that should just call wsa_errno(). I think WSAEBADF is only returned if the socket handle is bad. But if it's a file handle, it returns WSAENOTSOCK. So I think the only time we can safely call file operations is if WSAENOTSOCK is returned.The text was updated successfully, but these errors were encountered: