Socket library ghc 5.02.1
Simon Marlow
simonmar@microsoft.com
Thu, 22 Nov 2001 15:22:04 -0000
This is a multi-part message in MIME format.
------_=_NextPart_001_01C17369.70E62D9C
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
> In local.glasgow-haskell-users, you wrote:
> > It seems that the Socket library does still not work
> > with ghc 5.02.1.
>=20
> [ghci clarification]
> There, it crashes for me even on the 2nd invocation:
>=20
> connect(13, {sin_family=3DAF_INET, sin_port=3Dhtons(80),=20
> sin_addr=3Dinet_addr("137.226.194.33")}}, 16) =3D -1 EINPROGRESS=20
> (Operation now in progress)
> gettimeofday({1006436761, 219035}, NULL) =3D 0
> select(14, [], [13], NULL, {134, 217727}) =3D 1 (out [13], left=20
> {134, 220000})
> getsockopt(13, SOL_SOCKET, SO_ERROR, [1835091456], [1]) =3D 0
> write(1, "*", 1) =3D 1
>=20
> whereas on the first, succeeding call to 'connect' it says;
>=20
> select(14, [], [13], NULL, {134, 217727}) =3D 1 (out [13], left=20
> {134, 210000})
> getsockopt(13, SOL_SOCKET, SO_ERROR, [0], [1]) =3D 0
I'm sad to say there was another bug in SocketPrim.getSocketOption in
5.02.1. Please try the enclosed patch.
Cheers,
Simon
------_=_NextPart_001_01C17369.70E62D9C
Content-Type: application/octet-stream;
name="patch"
Content-Transfer-Encoding: base64
Content-Description: patch
Content-Disposition: attachment;
filename="patch"
KioqIFNvY2tldFByaW0uaHNjCTIwMDEvMTAvMTUgMTY6Mjk6MzcJMS4xNQotLS0gU29ja2V0UHJp
bS5oc2MJMjAwMS8xMS8xMyAxMToyNDo0MQkxLjE2CioqKioqKioqKioqKioqKgoqKiogMSw1ICoq
KioKICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQohIC0tICRJZDogU29ja2V0UHJpbS5oc2MsdiAxLjE1
IDIwMDEvMTAvMT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