From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-developers@cygwin.com
Subject: Re: AF_UNIX shutdown
Date: Mon, 19 Oct 2020 13:48:30 +0200 [thread overview]
Message-ID: <20201019114830.GC5492@calimero.vinschen.de> (raw)
In-Reply-To: <a7166f01-7508-d097-96d8-7aa3b94c17b9@cornell.edu>
On Oct 16 08:55, 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?
That was the idea. The shutdown info is part of the package header in
af_unix_pkt_hdr_t, so every newly constructed follow up package contains
the shutdown info "for free".
> 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?
That would make sense, I guess.
Corinna
prev parent reply other threads:[~2020-10-19 11:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 12:55 Ken Brown
2020-10-16 14:16 ` Ken Brown
2020-10-19 11:49 ` Corinna Vinschen
2020-10-19 11:48 ` Corinna Vinschen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201019114830.GC5492@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-developers@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).