socket-port Sven Hartrumpf (18 Jun 2013 06:38 UTC)
Re: socket-port John Cowan (18 Jun 2013 18:26 UTC)
Re: socket-port Takashi Kato (18 Jun 2013 19:09 UTC)
Re: socket-port Shiro Kawai (18 Jun 2013 21:40 UTC)
(missing)
Re: socket-port Shiro Kawai (18 Jun 2013 21:54 UTC)
Re: socket-port Alex Shinn (19 Jun 2013 00:51 UTC)
Re: socket-port Takashi Kato (19 Jun 2013 20:07 UTC)
Re: socket-port Shiro Kawai (20 Jun 2013 17:30 UTC)

Re: socket-port Shiro Kawai 18 Jun 2013 21:54 UTC

>From: John Cowan <xxxxxx@mercury.ccil.org>
Subject: Re: socket-port
Date: Tue, 18 Jun 2013 17:38:31 -0400

> Shiro Kawai scripsit:
>
>> Your logic is correct, so, in Gauche, closing one of the socket ports
>> does not close the socket descriptor (it does mark the Scheme-level
>> port structure as 'closed', and it does flush the output port).
>
> It should also do a shutdown(fd, SHUT_RD) or shutdown(fd, SHUT_WR), which
> is what I was trying to say before.  The latter, for example, signals
> to the peer that no more data will be arriving.

No, it shouldn't shut down the socket, because the socket may be
shared among processes.  A parent process may want to close the
socket fd to keep number of open fd small, while a child process
may still be using it, for example.

--shiro