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=-0.8 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19832 invoked from network); 30 Jan 2023 08:11:36 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 30 Jan 2023 08:11:36 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id AD3E64246D; Mon, 30 Jan 2023 18:11:14 +1000 (AEST) Received: from mail-vs1-f41.google.com (mail-vs1-f41.google.com [209.85.217.41]) by minnie.tuhs.org (Postfix) with ESMTPS id 042B14244F for ; Mon, 30 Jan 2023 18:11:08 +1000 (AEST) Received: by mail-vs1-f41.google.com with SMTP id h19so9825923vsv.13 for ; Mon, 30 Jan 2023 00:11:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hFcp49tmg0ygCgV78MvtceeuNR/YsYq82wSj5St3g+c=; b=olUvBrOpiqCa0sdLY2+xs1BxLGZpuSkJ6y3Tt12//EkLHxCA9T27/oYuNeKUK1PXgk MGuWctFSSnNliNF2mF13gnFwWQ4QXDTWob19F5vz2MAkK1AiwnVnFT3I4/5zJMjcNHAV 9ilVKl7OiKVBX3cJztnKC3lRkUn8j+J6dXv3cDdl6iExY7RjufTraq4JeazBaUwStnNg 8VlSt/h2RmQg+5bwv2nwAXdF8EtC6wo+cG/gDmu9q51rJ4sbXyVyd3joBcBk5fcqGQV8 9XvF/k81/B/FMZO5EvKyGO0K6Kpy53mqOm9LoPRm1k6CPnmimGSuGd7UuPOJVWfOu/4W rMZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hFcp49tmg0ygCgV78MvtceeuNR/YsYq82wSj5St3g+c=; b=Fh6QEr11fT/ow1lIAFmLqu0i5GgLKowFQaa8bype1aD8peBOQ/gA+eLHleDWCL10Cp WoUH3IBrm1LoQTRsdRrSM7YNV3KuEjPt9zw+lC4orfVdEOTNeqS7wMqCdJfJPRiPDTOC D3MzI9q9rXtgpYwkNfj4MBs2DXl+cbC1YQhBJkeXYbipRw+B7g6nDyK4JyXwBrKM/F4K NQi4ktGxhVhw2b/xW0o9S0uscJj1qjqch0jy4/atVocSVxBUaDTKrG3vmfQtSDPFU6YB k4GnpUcKyFjTXBhgA1/eKKoHIHBtNsK2T8vUXPgNFFk3VBt0PAsb7UUXdXKhy/8jQUxY XZPw== X-Gm-Message-State: AO0yUKUextZRmAFWoTk+yZ3G/Egjjn2vF5CCm9WRmYc2xtbMwKM42E6Y 17IaR0cqH+7BUNBcyckfHXBxO83+wp5YHzyqIj599wPoys8= X-Google-Smtp-Source: AK7set+mSw60B2sQhQNqc5BsVpIUY4a9V6QLmdXaFnSbvu5Xl4GUGWCJedCw5m7s7OLwq+7OuKEIbHP8hvrfc82YjU4= X-Received: by 2002:a67:fc89:0:b0:3f6:cb94:2028 with SMTP id x9-20020a67fc89000000b003f6cb942028mr478928vsp.56.1675066206841; Mon, 30 Jan 2023 00:10:06 -0800 (PST) MIME-Version: 1.0 References: <202301300750.30U7oQTh013304@freefriends.org> In-Reply-To: <202301300750.30U7oQTh013304@freefriends.org> From: Rob Pike Date: Mon, 30 Jan 2023 19:09:55 +1100 Message-ID: To: arnold@skeeve.com Content-Type: multipart/alternative; boundary="0000000000003beee405f376be10" Message-ID-Hash: 2CCHIVWTX5XKVA4J6WUULNW4VCKGDMQ2 X-Message-ID-Hash: 2CCHIVWTX5XKVA4J6WUULNW4VCKGDMQ2 X-MailFrom: robpike@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@tuhs.org X-Mailman-Version: 3.3.6b1 Precedence: list Subject: [TUHS] Re: FD 2 List-Id: The Unix Heritage Society mailing list Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --0000000000003beee405f376be10 Content-Type: text/plain; charset="UTF-8" In Plan 9 we made /dev/tty (there called /dev/cons) fully virtual, a fiction that provided the semantics. I agree that it's a pity the /dev/tty kludge persists as a kernel hack. And then we have pttys, speaking of pitys. -rob On Mon, Jan 30, 2023 at 6:50 PM wrote: > > > Where this is done is, as I posted earlier, in /etc/init. Init > opens the > > > tty device and dups it to 1 and then invokes either the shell (if > we're in > > > single user mode) or getty for interactive mode. > > > This was done in V6 and PWB (1). In V7, init added a second dup for > file > > > descriptor 2. > > What I really like is how in V8 - V10 /dev/tty was a (sym)link to > /dev/fd/3, > and init simply did one more dup call. That eliminated the special tty > device > driver and was a lovely generalization / simplification. It's too bad this > was never picked in the commercial Unixes or in Linux. > > Arnold > --0000000000003beee405f376be10 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
In Plan 9 we made /dev/tty (there called /dev/cons) fully virtual= , a fiction that provided the semantics. I agree that it's a pity the /= dev/tty kludge persists as a kernel hack.

And then we have pttys, speaking= of pitys.

-rob


On Mon, Jan 30, 2023 at 6:50 PM <arnold@skeeve.com> wrote:
> > Where this is done is, as= I posted earlier, in /etc/init.=C2=A0 =C2=A0 Init opens the
> > tty device and dups it to 1 and then invokes either the shell (if= we're in
> > single user mode) or getty for interactive mode.
> > This was done in V6 and PWB (1).=C2=A0 =C2=A0In V7, init added a = second dup for file
> > descriptor 2.

What I really like is how in V8 - V10 /dev/tty was a (sym)link to /dev/fd/3= ,
and init simply did one more dup call. That eliminated the special tty devi= ce
driver and was a lovely generalization / simplification.=C2=A0 It's too= bad this
was never picked in the commercial Unixes or in Linux.

Arnold
--0000000000003beee405f376be10--