From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE,RDNS_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 Received: (qmail 11131 invoked from network); 24 Mar 2020 10:32:32 -0000 Received-SPF: pass (minnie.tuhs.org: domain of minnie.tuhs.org designates 45.79.103.53 as permitted sender) receiver=inbox.vuxu.org; client-ip=45.79.103.53 envelope-from= Received: from unknown (HELO minnie.tuhs.org) (45.79.103.53) by inbox.vuxu.org with ESMTP; 24 Mar 2020 10:32:32 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id C24D29D75C; Tue, 24 Mar 2020 20:32:26 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 2F5509CD74; Tue, 24 Mar 2020 20:31:58 +1000 (AEST) Received: by minnie.tuhs.org (Postfix, from userid 112) id 6A73C9BD9B; Tue, 24 Mar 2020 20:31:54 +1000 (AEST) Received: from clarinet.employees.org (clarinet.employees.org [198.137.202.74]) by minnie.tuhs.org (Postfix) with ESMTPS id 6756C9BD9B for ; Tue, 24 Mar 2020 20:31:53 +1000 (AEST) Received: by clarinet.employees.org (Postfix, from userid 1736) id 616D74E11D22; Tue, 24 Mar 2020 10:31:52 +0000 (UTC) Resent-From: Derek Fawcus Resent-Date: Tue, 24 Mar 2020 11:31:52 +0100 Resent-Message-ID: <20200324103152.GC83316@clarinet.employees.org> Resent-To: tuhs@minnie.tuhs.org Date: Tue, 24 Mar 2020 10:47:10 +0100 From: Derek Fawcus To: tuhs@minnie.tuhs.org Message-ID: <20200324094710.GB83316@clarinet.employees.org> References: <20200306224431.D226C18C080@mercury.lcs.mit.edu> <3D1DBF45-AE50-4027-8AAA-6C1D97D28D4D@planet.nl> <20200307163935.GA57521@clarinet.employees.org> <20200308151332.GA70333@clarinet.employees.org> <5dbf2153-5993-242a-5ba9-54b49a38569e@spamtrap.tnetconsulting.net> <20200323084943.GA341861@straylight.m.ringlet.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200323084943.GA341861@straylight.m.ringlet.net> Subject: Re: [TUHS] sockets (was Re: First appearance of named pipes) X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" On Mon, Mar 23, 2020 at 10:49:43AM +0200, Peter Pentchev wrote: > On Mon, Mar 09, 2020 at 05:22:57PM -0600, Grant Taylor via TUHS wrote: > > On 3/8/20 9:13 AM, Derek Fawcus wrote: > > > Now what would have been useful is a way to have distinct fd's for the > > > local read and write end of (e.g.) a TCP socket - such that one > > > direction could be closed w/o closing the other. > > > > I believe that this can be done, now. At least I've read that it's possible > > for one end to close (FIN) a TCP connection without the other end also > > closing. Thus you end up with the one-way data flow that is still ACKed the > > way that TCP does. > > Yep, in the next sentence Derek mentioned "dispense with shutdown", > meaning the shutdown(2) syscall that does exactly that. What he meant > was, wouldn't it be nice to be able to do that with close(2) instead? Quite. One point being that one could fork/exec a program with those fd's attached to stdin/stdout and it could operate as a normal filter, w/o having to understand it was using a socket. (i.e. closing stdout [hence triggering a FIN], while still reading from stdin) Plus various other games achievable by replumbing fd's. DF