> In local.glasgow-haskell-users, you wrote: > > It seems that the Socket library does still not work > > with ghc 5.02.1. > > [ghci clarification] > There, it crashes for me even on the 2nd invocation: > > connect(13, {sin_family=AF_INET, sin_port=htons(80), > sin_addr=inet_addr("137.226.194.33")}}, 16) = -1 EINPROGRESS > (Operation now in progress) > gettimeofday({1006436761, 219035}, NULL) = 0 > select(14, [], [13], NULL, {134, 217727}) = 1 (out [13], left > {134, 220000}) > getsockopt(13, SOL_SOCKET, SO_ERROR, [1835091456], [1]) = 0 > write(1, "*", 1) = 1 > > whereas on the first, succeeding call to 'connect' it says; > > select(14, [], [13], NULL, {134, 217727}) = 1 (out [13], left > {134, 210000}) > getsockopt(13, SOL_SOCKET, SO_ERROR, [0], [1]) = 0
I'm sad to say there was another bug in SocketPrim.getSocketOption in 5.02.1. Please try the enclosed patch. Cheers, Simon
patch
Description: patch