AF_UNIX shutdown
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Oct 19 11:49:24 GMT 2020
On Oct 16 10:16, Ken Brown via Cygwin-developers wrote:
> On 10/16/2020 8:55 AM, Ken Brown via Cygwin-developers wrote:
> > Hi Corinna,
> >
> > I'm about to add some code to handle shutdown info, and I want to make
> > sure that I understand how this is supposed to work.
> > fhandler_socket_unix::shutdown contains the following comment:
> >
> > /* Send shutdown info to peer. Note that it's not necessarily fatal
> > if the info isn't sent here. The info will be reproduced by any
> > followup package sent to the peer. */
> >
> > Does that mean that sendmsg should send its shutdown state as part of
> > every packet it sends?
> >
> > And I guess recvmsg should call grab_admin_pkg at every opportunity and
> > should also check the shutdown state in every regular packet it reads?
>
> Another question:
>
> sendmsg currently returns ESHUTDOWN if the socket has been shut down.
> Shouldn't this be EPIPE? See
> https://man7.org/linux/man-pages/man2/sendmsg.2.html.
Right, looks like I screwed that up. Thanks for catching.
Corinna
More information about the Cygwin-developers
mailing list