From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by sourceware.org (Postfix) with ESMTPS id 7A0C33838026 for ; Mon, 17 May 2021 10:26:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7A0C33838026 Authentication-Results: sourceware.org; dmarc=fail (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 (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McY0L-1lD6eU3crt-00cv1C for ; Mon, 17 May 2021 12:26:11 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 7526BA80EF3; Mon, 17 May 2021 12:26:11 +0200 (CEST) Date: Mon, 17 May 2021 12:26:11 +0200 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: The unreliability of AF_UNIX datagram sockets Message-ID: Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <5564e10e-9099-fc5a-3a8d-c2ffb8ca4cff@cornell.edu> <41fde522-4d14-a957-96ad-c5eaa0e0a801@cornell.edu> <1aa91ec3-ae10-0e83-470d-a8a2dcfd83b0@cornell.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:EImMSASrUX6vet7y5RTk+zWPSZbtqPKajmWelFU2+aokGVqgo78 Z3DSU2EwNakeaRzLiTkpolnSS5WjEzC86bGspJh+49FERKBmuyHpKYqSvfyxN7Lx005XKit aECUwIiPUjpC98EK+Lw+yWH2GHNc4VeJrzdSPkVoHS+jdlkIYlCQB/wwyK7LenpXAUVb8VA ashanhLjkNxovMW70EoMw== X-UI-Out-Filterresults: notjunk:1;V03:K0:lJkwG40YwrY=:AdVfttD2Hc5U9WbIoN6DAX 5nHmeAea1tQHCID3iCsmmvaJb9nxAAqZWWAVy+m82I3D9if6mxv4IO4/p7MdHvH+rKQzytHiv 5JZN5C2rrnPP1pK+q6+xzHJ/bQBDpTF05lKbJJH+M9iibZpMtxo3//e2V3CpP4MuaerB6bNCF vhSnndvQF/hA7eF9sOh9s9MvtkDn+/Td1BJpkQpZqqrHCcvUsC6TsipFVGO7n4kpqhTk8wkvC ucPWFWhZc/Z9dawQI91etbUr/NrzM02//t4/md/GZy+Uh7v3xIEK72roXDiKt4MAVwpTtk22y 7Y9elFpoL99NiRH7nyjAOrXNO+il5x81WU6vcd7FVCXUPc8bY+Lav2mrzVodFn2yrVke9OCr1 s3Lcxe/KJXS0mPVI7rLCcmub3CPNVrl++M8J1mbmrL8FiUI7Cgu/cVeQd3/dOCF8pXf75nu3a mmN2zGoCZPE+sN/KKJXF+ebv1RQ+eOx3HssIQ50ULcXqz2/a5hVxpbrZQcv3yGO9wPKQy5y7X 0r3ROq30GHzRl9nQ4gJKbs= X-Spam-Status: No, score=-100.1 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, 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, 17 May 2021 10:26:15 -0000 On May 13 10:30, Ken Brown wrote: > While working on sendmsg, I thought of another useful thing that the mqueue > code could provide: an internal _mq_send function that returns EPIPE if no > one has the mqueue open for reading. This plays the role of the > STATUS_PIPE_IS_CLOSED macro in the pipe implementation. I don't see how to do that. The code is written in a way not requiring to keep track of stuff at runtime. All shared info is part of the mmap so far. We don't know if any other mqd_t descriptor is open at the time, it's not even a descriptor in the usual sense, just a pointer to a private malloc'ed area. Keeping track of open descriptors requires another shared mem region at runtime. Corinna