[usocket-devel] better SOCKET-CONNECT for SBCL

Nikodemus Siivola nikodemus at random-state.net
Thu Mar 10 09:42:35 UTC 2011


Current implementation has the following defects:

* The socket stream ends up with a bogus name as it is created before
the socket is connected, making things harder to debug than they need
to be.

* In case of error, SB-BSD-SOCKETS:SOCKET-CLOSE was not being called
with :ABORT T.

* A unwind from SOCKET-CONNECT that didn't go through the handler leaked an FD.

* An innocent non-error SIGNAL for any reason during SOCKET-CONNECT
was taken to be a fatal error due to the handler on type T.

* On datagram sockets CONNECTED-P wasn't set.

Attached patch addresses these issues. Not deeply tested, though.

Cheers,

 -- Nikodemus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbcl-socket-connect.diff
Type: text/x-patch
Size: 5004 bytes
Desc: not available
URL: <https://mailman.common-lisp.net/pipermail/usocket-devel/attachments/20110310/562d8f75/attachment.bin>


More information about the usocket-devel mailing list