[GHC] #12012: Socket operations on Windows check errno instead of calling WSAGetLastError()
GHC
ghc-devs at haskell.org
Tue May 15 17:05:56 UTC 2018
#12012: Socket operations on Windows check errno instead of calling
WSAGetLastError()
-------------------------------------+-------------------------------------
Reporter: enolan | Owner: Azel
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Core Libraries | Version:
Resolution: | Keywords:
Operating System: Windows | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4639
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"01b15b88639443bec12415b6b0d906261bd6c047/ghc"
01b15b88/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="01b15b88639443bec12415b6b0d906261bd6c047"
Calling GetLastError() on Windows for socket IO (trac issue #12012)
For the threaded RTS, putting a private copy of the throwErrno
series in GHC.IO.FD which gets if the operation was on a socket,
so that we can call c_maperrno if need be.
For the non-threaded RTS, if memory serves we call GetLastError()
in case of an error on socket IO. However, we don't do the translation
ErrCode ↔ Errno currently (and besides, it's a primop) so we do it if
needed through c_maperrno_func in the asynchronous read/write
functions.
Signed-off-by: ARJANEN Loïc Jean David <arjanen.loic at gmail.com>
Reviewers: ekmett, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie, carter
GHC Trac Issues: #12012
Differential Revision: https://phabricator.haskell.org/D4639
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12012#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list