[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Last call

This page is part of the web mail archives of SRFI 106 from before July 7th, 2015. The new archives for SRFI 106 contain all messages, not just those from before July 7th, 2015.

Good question.  IIRC, not doing shutdown(2) doesn't do any harm
if the socket is used by a single process, for the reader of
the other end gets EOF when the only process using this side
closes its fd (correct me if I'm wrong).
So my bet is call-with-socket shouldn't shutdown the socket.

The possible problem is when a child process is spawned
during the dynamic extent of call-with-socket and it keeps the
reference to the opened socket inadvertently.  But that's rather
an issue of process handling (e.g. process spawn API can
provide a way to guarantee to close all fds other than explicitly
declared to be shared).


From: Takashi Kato <ktakashi@xxxxxxxxx>
Subject: Re: Last call
Date: Sun, 30 Jun 2013 12:28:00 +0200

> Thanks!
> Now, I've got a question about 'call-with-socket'. Should this
> procedure shutdown the given socket as well? Since it's closed and
> once it's done there is no way to grantee to call socket-shutdown with
> the given socket. Or just mention that shutting down a socket is
> users' responsibility is enough.
> _/_/
> Takashi Kato
> E-mail: ktakashi@xxxxxxxxx