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_INVALID,DKIM_SIGNED, HTML_FONT_LOW_CONTRAST,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 27187 invoked from network); 21 Jan 2023 17:36:01 -0000 Received: from minnie.tuhs.org (50.116.15.146) by inbox.vuxu.org with ESMTPUTF8; 21 Jan 2023 17:36:01 -0000 Received: from minnie.tuhs.org (localhost [IPv6:::1]) by minnie.tuhs.org (Postfix) with ESMTP id 9A22C4255D; Sun, 22 Jan 2023 03:35:55 +1000 (AEST) Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) by minnie.tuhs.org (Postfix) with ESMTPS id 110DE4255C for ; Sun, 22 Jan 2023 03:35:51 +1000 (AEST) Received: by mail-ej1-f47.google.com with SMTP id hw16so21195304ejc.10 for ; Sat, 21 Jan 2023 09:35:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.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=oowaEjkw8DyZaJ8K6RuYp33Qodf0aIQjjhDTIDF6fjc=; b=aoOtCS0oFWjktUwoBg66jKpQ9fVde84AwaOm2OpNmiUe9GUbgydDwIcKDPYQSbbjHl uZN93of9PFwROs9IPrbBghDCzqbfGgXJWzc4LB6fQno5HcI5a3hU5XqPCh0yG72gJW6z N1a4PpHESbgP6VADQy1RDXMRd8TwOBWKw13bgxSYNxDrzS8VDXh/VJ4Qd6zW2foSXa2K 5gudwYvluhtmsm7JTf0mOnCUaRHZ0pn0aq7yAIoJj4TYck4GmHwWvJnMFpC1SE2qcAjK 5CrEH/UejOlLtLh4KCK/m/5zsa0VZxsb5iW2tM3T37Fg7ezbYSGHo3d4sHUVTCQJWXIp E9Dw== 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=oowaEjkw8DyZaJ8K6RuYp33Qodf0aIQjjhDTIDF6fjc=; b=xtZfxjd+DlhPhw4uLYRCHO2h2opnG1+D+o+BYFJG1954gkK+sSnjzgEAO42CY5m5zD K++1B3GNAN7KXpJ/1U/nKtb/MBe0dTEvntjWvYobrrVlbSiMzOA80sIfuSuNsFk0qBKc +mfx3OUY51+cBPvbca3imwMPEGMXlrut5KIHt+6bmK8KD6DyVtGHiTK8oIXtrPPv7i2m xMo5iVpvm1+5PFYejJLDpTOjoOTmU1w9iWja2VuqMOrl1Ad1EyszRW9DpckiEG92o/XW F0yeHB7mYKj1VIzyBex2VMvfeuBO7Fyif59AbJOvBr9TowDevW3ulH4ZiQlo+BnR6n85 ROkw== X-Gm-Message-State: AFqh2kpjL8bc+KaBAuhlCY1XAsOsrhXmTWQh4+0bau1tlo+G67fbQIo7 fZdl1E9Ngxtfh6ivkTQdUya1PjXaTzSxhniiuJFsIA== X-Google-Smtp-Source: AMrXdXv/bDE0415s7+HdtJWkOZPC0OK3exRNtQA4wM8DzgGnTkdG/WKyGB6pRkqnRo7pTlj/djzzbFwIMS8SMwrdVe4= X-Received: by 2002:a17:906:c7cc:b0:871:ac32:88a2 with SMTP id dc12-20020a170906c7cc00b00871ac3288a2mr1401674ejb.439.1674322489383; Sat, 21 Jan 2023 09:34:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Warner Losh Date: Sat, 21 Jan 2023 10:34:37 -0700 Message-ID: To: Clem Cole Content-Type: multipart/alternative; boundary="000000000000382e4805f2c995f0" Message-ID-Hash: 5UEH5QWJBIC6CDMJXMWX3QM3U42K4MWT X-Message-ID-Hash: 5UEH5QWJBIC6CDMJXMWX3QM3U42K4MWT X-MailFrom: wlosh@bsdimp.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: The Eunuchs Hysterical Society 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: --000000000000382e4805f2c995f0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Jan 21, 2023, 8:45 AM Clem Cole wrote: > Certainly fd 2 as a error output appears with Lesk's portable C library, > which was included in V6 - see the last para on page 1 of his document: > > "Initially you are given three file descriptors by the system: 0, 1, and > 2. File 0 is the standard input; it is normally the teletype in > time-sharing or input data cards in batch. File 1 is the standard output; > it is nor- mally the teletype in time-sharing or the line printer in batc= h. > File 2 is the error file; it is an output file, nor- mally the same as fi= le > 1, except that when file 1 is diverted via a command line =E2=80=99>=E2= =80=99 operator, > file 2 remains attached to the original destination, usually the terminal= . > It is used for error message output. These popular UNIX conventions are > considered part of the C library specification. By closing 0 or 1, the > default input or output may be re-directed; this can also be done on the > command line by >file for output or > This document pre-dates ditroff. The idea/names of stdin/out/err (as > opposed to fd 0, 1, 2) does not come about until Dennis does "typesetter = C" > which is described in K&R. > > That said, my memory is fd 2 as ana error path was there in Fourth or > Fifth Edition, before Lesk did this library -- i.e. it was a convention > that Dennis/Ken et al were all using -- when it is realized that printing > errors on in the same output flow as the standard (normal) output was > problematic in a pipe stream. > =E1=90=A7 > It looks to be a mixed bag in 5th edition. Cc, ac, comm and find all printf the errors. Diff uses writes to fd 2. I didn't catalog further, but this kinda looks like a developing convention, not yet fully realized. . Warner On Fri, Jan 20, 2023 at 5:46 PM ron minnich wrote: > >> I am trying to remember when fd 2 (aka stderr) became a thing. I have a >> vague memory that it was post-v6 but that may be way off. >> >> >> --000000000000382e4805f2c995f0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sat, Jan 21, 2023, 8:45 AM Clem Cole <clemc@ccc.com> wrote:
Certainly fd 2 as a error output appea= rs=C2=A0with Lesk's=C2=A0portable C library, which was included in V6 -= see the last para on page 1 of his document:

"Initially you are given three file descriptors= by the system: 0, 1, and 2. File 0 is the standard input; it is normally the teletype in time-sharing or input data cards in batch. File= 1 is the standard output; it is nor- mally the teletype in time-sharing or the line printer in batch. File 2 is = the error file; it is an output file, nor- mally the same as file 1, except that when file 1 is diverted via a command= line =E2=80=99>=E2=80=99 operator, file 2 remains attached to the original destination, usually the terminal. It is used for = error message output. These popular UNIX conventions are considered part of the C library specification. By clo= sing 0 or 1, the default input or output may be re-directed; this can also be done on the command line by >file for output or <file for inpu= t."

This document pre-dates ditro= ff.=C2=A0 =C2=A0The idea/names of stdin/out/err (as opposed to fd 0, 1, 2) = does not come about until Dennis does "typesetter C" which is des= cribed in K&R.
<= br>
That said, my me= mory is fd 2 as ana error path was there in Fourth or Fifth Edition, before= Lesk did this library -- i.e. it was a convention that Dennis/Ken et al we= re all using -- when it is realized that printing errors on in the same out= put flow as the standard (normal) output was problematic in a pipe stream.= =C2=A0 =C2=A0
=09 =09
3D==E1=90=A7

It looks to be a mixed bag in 5th edition. Cc,= ac, comm and find all printf the errors. Diff uses writes to fd 2. I didn&= #39;t catalog further, but this kinda looks like a developing convention, n= ot yet fully realized. .

Warner

On Fri, Jan 20, 2023 at 5:46 PM ron minnich= <rminnich@gmail.com> wrote:
I am trying to remember when fd 2 (= aka stderr) became a thing. I have a vague memory=C2=A0that it was post-v6 = but that may be way off.=C2=A0


--000000000000382e4805f2c995f0--