From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 23517 invoked from network); 2 Jul 2022 19:37:00 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 2 Jul 2022 19:37:00 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id ACD0B40D68; Sun, 3 Jul 2022 05:36:38 +1000 (AEST) Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) by minnie.tuhs.org (Postfix) with ESMTPS id DD84B40D41 for ; Sun, 3 Jul 2022 05:36:30 +1000 (AEST) Received: by mail-ej1-f48.google.com with SMTP id mf9so9837397ejb.0 for ; Sat, 02 Jul 2022 12:36:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=qIvxo85AfoKgkTGE9rUBI0k4bLj84/e8PS3AjxP8ClE=; b=LsXn2qvbsBDZc9IqHmy+qsq0XnSLuhM+44r7y2C6qu/p2EJN2hIoloHyVmutAXlTPV FnK+ezKQt6DjZLKTAUstMovhfbgyqWeVitEhnr1sM7qHBf3IWOWfbR7iqUTjVFZSbCP4 Hzzw+VdspK/6coQcJnqKOE+2KL/CeF+h93VIiwlj8iBY1gMm/xaR5hOvMqFWEtLwrsLg 2DeahuHP1iKPzfg1oDDxES8ZzqOaM2CjXA2RBMZE0cganwFcT1jr5E8ID14emSrW3Aa/ 37KwASrPk1q8/zQ+L4Dmj1hAmWvB9Wo4OuQXDFIyYJ2BFDUea9GsdaP6J5+gukZ/KiLo GzdQ== X-Gm-Message-State: AJIora9/OhMrMxMYuQgTErGqYlq6Xw14ZscpWb/baDaYOewDtgViHYcY peC7vk5G5ZfcJxPEqUcjUFU= X-Google-Smtp-Source: AGRyM1tpb/4OMuZIOj3DPhQ+yNaA1aZMvaBfy7ADX/VsYg6Q7BCPtXdBeT24E+ohG/BSqwuEXzdCog== X-Received: by 2002:a17:907:da7:b0:726:9c0b:708b with SMTP id go39-20020a1709070da700b007269c0b708bmr20976001ejc.595.1656790589362; Sat, 02 Jul 2022 12:36:29 -0700 (PDT) Received: from rhea.home.vuxu.org ([2001:a61:3a21:b201:1e1b:b5ff:fe8a:9003]) by smtp.gmail.com with ESMTPSA id c27-20020a170906155b00b00726c0e63b94sm7330226ejd.27.2022.07.02.12.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Jul 2022 12:36:28 -0700 (PDT) Received: from localhost (rhea.home.vuxu.org [local]) by rhea.home.vuxu.org (OpenSMTPD) with ESMTPA id 66d84f3e; Sat, 2 Jul 2022 19:36:27 +0000 (UTC) From: Leah Neukirchen To: Clem Cole References: Date: Sat, 02 Jul 2022 21:36:27 +0200 In-Reply-To: (Clem Cole's message of "Fri, 1 Jul 2022 11:01:50 -0400") Message-ID: <874jzz8fyc.fsf@vuxu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Message-ID-Hash: Q55ABMI3L55GWSNGLYICMKXO2M2OXG4M X-Message-ID-Hash: Q55ABMI3L55GWSNGLYICMKXO2M2OXG4M X-MailFrom: chneukirchen@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tuhs.tuhs.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: TUHS X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: "9 skills our grandkids won't have" - Is this a TUHS topic? List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Clem Cole writes: > On Fri, Jul 1, 2022 at 10:03 AM Steve Nickolas wrote: > >> On Fri, 1 Jul 2022, Nelson H. F. Beebe wrote: >> >> > Ctrl-D signifies end of transmission. Some other O/Ses have used >> > Ctrl-Z for that purpose, presumably because Z is the final letter >> > of numerous alphabets. >> >> I thought only CP/M and its descendants did that. :o (Of course that >> includes DOS and Windows) >> > Steve - The social disease spread of DOS-11, RT-11, CP/M, and MS/PS-DOS > used ^Z as an EOF character in their text file format. The key is that > they stored a block count, not a byte count in the META. Thus the last > byte needs a marker to tell the OS to stop reading. [Early DEC OS's may > have done that also, but I never looked at their FS formats]. > > Unix, of course, never made any distinction to the core OS WRT to 'type' > [other than Regular/Directory/Special] and Ken stored a character count. > So there was no need to signal EOF with a markered stored on disk.. > > A pipe or the shell on the other hand does have a need to signal the end of > a transaction, and 'End of Transmission,' as Nelson points out, is the > ASCII character reserved for the same. But that's a common misconception and not how Ctrl-D works on Unix. Ctrl-D is part of the terminal discipline and causes an immediate stop of the current read(2) syscall. If nothing is in the input buffer, this causes a zero-length read which is detected as end of file. You can verify this e.g. by typing "foo" into cat(1). It will print "foo", but not exit. Another Ctrl-D will then quit cat(1) due to the empty read. In no case, a ASCII Ctrl-D 0x4 is sent over a pipe or to a shell. (Over the pty, yes.) cheers, -- Leah Neukirchen https://leahneukirchen.org/