From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by sourceware.org (Postfix) with ESMTPS id C90C73854824 for ; Mon, 19 Oct 2020 11:49:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C90C73854824 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=corinna-cygwin@cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MY5wD-1kvZBA4BA5-00YOeS for ; Mon, 19 Oct 2020 13:49:26 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id EDF76A8102A; Mon, 19 Oct 2020 13:49:24 +0200 (CEST) Date: Mon, 19 Oct 2020 13:49:24 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: AF_UNIX shutdown Message-ID: <20201019114924.GD5492@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Provags-ID: V03:K1:IPwY5bldMGZRgeyBcoUtZlqEWgNB5r//Ntwa/jENdj38Psy7+la cdTv+f1HKL89qMncK6XHZpNOPBk0g7Jpr/GeYIPQTKgx86bMk7Coyr3g3ynkPWQYzVBQBex Nw9lEQpqffRlcrHrmJuecuobg+7VOliIqjPAmEYsAtcWHkqiSqfGhVju3sZUOqvUYvr1eFF T8rRMpFah1ATzn4GJpoUQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:fTafVYaU7fY=:8EIyB3g+gyuGZd4fyIS7Zj yKlQSNp4bNtxzFmBxTepAnZ9NSvHfKuQBqXXXLILnj4AixvGYrAvOyxj4UKtBf1S1Sr5KLbqx sEsZFENReu9bORS6TPc5AesNICOXJCo81x1KYR3ewO2GB/G4SQ+H5BLJNY9QP9lVzqmxtFXno 1M+DUAfhT2euWawLDoXNZB12t89lyb0hPhhRCroiQ1K/HImvgbfrHpc7y7FwyC+ISEL87D99X /cGwKd4Q7n6Cfu1Z+zOXkJAA+UUWkr9Ul+Ggb2XXDSOwrEkTj15OiWMS8Bd4kJGIpoGNkrlnp 3WkPPYi8lCpqMOhrHlXOFla4uwBkW60oWs04sk4WRSU5drU6T/+HpFG18jqmARQ3OhpbsMuV7 5SawD7WgvZbaiLOhiWklBdAtgitWdD1V+xBxMz/0O/5ds9B1uJj5gFgxJ2DFFnHfsjg25arMm Z668nr2FpA== X-Spam-Status: No, score=-100.1 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin-developers@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin core component developers mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Oct 2020 11:49:29 -0000 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