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=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 32214 invoked from network); 7 Apr 2022 22:32:29 -0000 Received: from minnie.tuhs.org (45.79.103.53) by inbox.vuxu.org with ESMTPUTF8; 7 Apr 2022 22:32:29 -0000 Received: by minnie.tuhs.org (Postfix, from userid 112) id 652F09D6E5; Fri, 8 Apr 2022 08:32:24 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 23D1B9D6B4; Fri, 8 Apr 2022 08:30:17 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=pass (2048-bit key; unprotected) header.d=algebras-org.20210112.gappssmtp.com header.i=@algebras-org.20210112.gappssmtp.com header.b="yh/fd3aH"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id D60FE9D6B4; Fri, 8 Apr 2022 08:30:14 +1000 (AEST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com [209.85.167.48]) by minnie.tuhs.org (Postfix) with ESMTPS id BA48D9D6B1 for ; Fri, 8 Apr 2022 08:30:13 +1000 (AEST) Received: by mail-lf1-f48.google.com with SMTP id y32so12053605lfa.6 for ; Thu, 07 Apr 2022 15:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=algebras-org.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=8JDLm4Ah5/i5ZcUgDNma3V33O8q80AY/HzYWv1/gofI=; b=yh/fd3aHI4yh6jpXUo9ibuepc7aXQMqvmZCosCsdbNFp40x56RZjXsz5lXG9CI3SNS hZnDPxWIAdgs7BCeWAK7Gy5PL/hw2X6mFVfngEAJhkAdE1ZlUANgO7PG8NC+iU8YnW73 RvEgdO1h4GA3X7QiJoosIJqzzvSVYRr2NrlJWkxLEucRgx+MtS6czlEN6XVYSC0RslEc UjuhcPRz0vhKCHLYzlFRjSxyr9YnkGvbzxwidP52inuxt8Yl5Qbuixj1WDuKR2GxAo5W S6xRus0YcCVeAuto81U3b0L7vetQT+dotLDcwNCNHhGp6UUE5D0q7c6iJuEQM7NzkGSZ sgbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=8JDLm4Ah5/i5ZcUgDNma3V33O8q80AY/HzYWv1/gofI=; b=I8I+8SL9pCSvtCkyT4MshjHdWLuY7NDVvxiUk+dEbxqBmwDpxt4vL0YeFP3sYAVFzq UvrJ711HqNzPcqPNr5rUzaHMmkPvHGabeX6APC7nl2XM2vOWYhJ+v/O7rn5POGnylBkf IfF5z2N0lyjzk4VO+FV9K+7XUgkuZuPomctPPSXh3a02pLZZxcpy6QhTL5li70/tjUt/ Fs6iYJcW6y/X173RuHdGrE+7rmGEkK6HwgYF8Wi35icOwXY7ttotUTu2xRloS5djKNWN 5Fo7h6LKWRrNJq7WDKjv+aA2MoL4hcn+xKV5utoh+2OR8H1twaKiflh8wlt8hYetCaqD ClFw== X-Gm-Message-State: AOAM533qDaXXeZLZFB4ze1efVZS2NZHwnfCJWM+DlFeOIACwhV1r+OdL fezEel7JH5TEpKQv5xjBL94ZO+2zdOJsHoQlfXl6KOsvuMs= X-Google-Smtp-Source: ABdhPJw0JB71kYMNltQQKumeJNbxl8j7A4RJivL4MssqWOrg1G7otuXFQCUIB6Q26IRLfZFnuTrhnFUl2J4AjMsPue4= X-Received: by 2002:a05:6512:b18:b0:44a:9a1f:dcf6 with SMTP id w24-20020a0565120b1800b0044a9a1fdcf6mr10926904lfu.4.1649370611874; Thu, 07 Apr 2022 15:30:11 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: George Michaelson Date: Fri, 8 Apr 2022 08:30:01 +1000 Message-ID: To: TUHS main list Content-Type: text/plain; charset="UTF-8" Subject: Re: [TUHS] Why does shell write to stderr? 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" I also had extreme WTF the first time I looked in code and saw an isatty() guard over some activity. "this program processes stdin to stdout, except.. if I decide otherwise" never appeared in man pages. But that said, it sort of made sense. Why ring bell in an editor, if you know the input pipe side can't hear it? A tty is a rather strange device being the join over stdout, stdin and stderr, and there is a (tiny?) set of things which need to know. more for instance, probably needs to know that waiting for a command to move pagination onward if there is no controlling terminal is not sensible. If you want your input in chunks, more is not the way to do it. I hate special cases. This is why people say english is so hard to learn but really all languages have them, its just that english having stolen words from everywhere has more instances of isatty() than others. -G