From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by sourceware.org (Postfix) with ESMTPS id B836A3854824 for ; Mon, 19 Oct 2020 11:48:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B836A3854824 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 (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MD9Ox-1kcxyg29jd-00993V for ; Mon, 19 Oct 2020 13:48:31 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id E859BA8102A; Mon, 19 Oct 2020 13:48:30 +0200 (CEST) Date: Mon, 19 Oct 2020 13:48:30 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: AF_UNIX shutdown Message-ID: <20201019114830.GC5492@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 In-Reply-To: X-Provags-ID: V03:K1:FqsGgWmep58NevaJatu9ULcHniJxwd0wYuxh3tZ/Az+QSeSVE0f bO61ijWI1Gt9PvwqnupeYEVjUnbA7TeUyNDvVm7bGZwZ3u+9qhs1gd8MZ+zfgfJQ42JTVOS VQwaYUloGOiwxMY0/0OxPEiFQqXRMGWGvt1pxv5nWczi6cWX7jaCc83qpKsMWrwZs9SMgxL bKwAm5getDUbt6jfS0bcg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZraxH3vWJCQ=:Qoxf8hUJsHAwwb9tKHZxfE kOUqGF/TDULVyTzsZSAVTKLGe3I0eLaZ5aRhsrQgzpQYY0maRhedWvO3w4LZis787SxFwAreL kgibaQHICOb/N8HSW1ff5x4nhcSMFXDa/Wo6+kSqiOGkiQA5bmuQm8jcPycJ4Fja0GehgMPNJ aN6EzG6kETn1Bkt9Y8gp8zj7K+FiGc8nrYfotIbLFSEMc5uktT45tloeiKso7eCLFFTBmovzF toLRmjzw07ScviDUbGGOBsQpK8fIDwdG2CUuYfG/wH1R0fzQi4MBMh+sNoSZ/FUHDMmg8oZrG YG6NruqAKtXs5tTce2iRKKUhR4Y4Yn3RWbBjpdnzbYe+MyGbqCixjqcP3/1C3VD+zcHLhyTy+ OXHdLYYNZi8ZhiXlPk1tRQ7iTv9wTHOCulLmTVxYhtveViEOgUiq51cCRkBjAdod8YdHY17CL fZC4DfTeiQ== X-Spam-Status: No, score=-100.4 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_STATUS, 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:48:35 -0000 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