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=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 3221 invoked from network); 14 Feb 2021 19:33:58 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 14 Feb 2021 19:33:58 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613331238; b=THJec1igFX0wFYZ/AWjub2eBZoZg94NLSIfIRO7dt9YYjziw/6X6CQVExYC9XP5fUJYleZ9jdJ Xy1iRRk0eTsavu0c/GffU1EIx1sYNPWfazywoWTvjoCRhmwv/KhAPf6D4IDl1/mRRF7HpiZZpt wSfLUx4d8dUDE6iLs09C38boYWsoH4afhBH7wqw0tPack8XWqDeD4y2w8rPHfaG41VjXwHXB0k NMzKAael0AbJ3R9HoxvdJ4IgeuFGJBSgEl5+Ama0fqwWFFqat7CDHXsl1vMXm7i5mSq1ppJoMa OSNwJG3tDDgaoJUtCi5cdFZPdEUx1pMuhduWicPbjx5T5Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f44.google.com) smtp.remote-ip=209.85.210.44; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613331238; bh=UqeBa6rmBuWLIgOrv8vIpALuL6nP3Nue23iajk60xfI=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=qgBtHYjA389OC1pBpre3ZHgjti2TKTyQsIf7L1zStHVH6itnYXG3L+icM7hz0xU6PiWN+YaWCP isWmr13uMS/09HyzkjzBc/tKWQdfTmaqK0uyzS1Gt9lEwsb0kcU5+C/Z0nlG0LAfawhGpt/ulV XW/M/clic8yOjyhcyOVSYL2suzljGHBYssXRDFQmst+Gw7GJXGPn7y8ZgObequciGymACgx7xt Hj5C9iDLGgHxQOzrZ80zACuP4dsD96KtrOhY/cgXYCeDom0LQFDv3ikWTeA/It0qt2+kgjD383 y3+uAC79ss3axd+2RiDUBwFYj4PjqX0Ym3eBFF0bAZE/SA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=x2inUG+xeS9xPXNnkZwXC2hFP6SL30cYLpl0JT0zqh8=; b=yPhA6FON7RTJfNsNAaNCfSicGd fJUQkedf5vJWR/pkmrDMG0HnBAyI4TZpTlBXccp/tbGhqChJzgIDRt9PtzLLapHnEerCRxlACznFf sv67fNQlcpzaYtt0WYyu1lDs2v264v66FrSm3PbN25jdS9IDA1SihAg/tPh0Agfh5hpjbD7PS2soc oMXPdALkdUqbb1M8nLBko9LhUsZu4UVFal81b8kEBmzvukq6YcZZUnOevX2Vme+iOdUVxqLmO7Ne7 3FoAEhO0muXRqB66K2uk/1ti/7yZ5okOrrP4L1txQMmCnGUa0DN7yq5a0eGHECTEu+wz0uLOmUS+D P+u08kzg==; Received: from authenticated user by zero.zsh.org with local id 1lBN9Z-0001jS-Iu; Sun, 14 Feb 2021 19:33:57 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f44.google.com) smtp.remote-ip=209.85.210.44; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ot1-f44.google.com ([209.85.210.44]:38322) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lBN91-0001NE-So; Sun, 14 Feb 2021 19:33:25 +0000 Received: by mail-ot1-f44.google.com with SMTP id e4so4271079ote.5 for ; Sun, 14 Feb 2021 11:33:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=x2inUG+xeS9xPXNnkZwXC2hFP6SL30cYLpl0JT0zqh8=; b=lMbWGnYIGCWApIxVQqwCzc5ibb1AEde4piv0QRWnsEhP5HwvxfEkFPizZB0qXiMHl+ qZPP9jY6G+weAsaoAWES1HPH4IktDqTAo9qPKv2etfc+xfQpsWiXEHqvPrtjJcdgxBlN vtmmdlzREyqdEG7zl5P8hphE8nfkF+82fy0pw58RHC637bSh3BLzvJDehJOX1grMWUOj TPoUYgmUJ5VUko6UZ8/+8oAXrl/gzDNQma0uJ3Y3KWJeoCmNtR9fIJYDWOgRO85Tm48Z 5HrDSNY4PXKU3tOaVcp38Vba+UgTOmC/FB1dSt1sBzABvENmbklkh64MvglXrCEs7bYn 2KXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=x2inUG+xeS9xPXNnkZwXC2hFP6SL30cYLpl0JT0zqh8=; b=q3DAU0gOKxtSkaHyBf8j1dtogS85low78c5ukWb7h/NOO+FmArueEsF+wHvV6MMa+J sOX6hWPoP1ccfdfIIBACqKbMonwQpOmYP+CodNOlTTMFBKI3irEtIE7unysAj99yvcpf TJEDVXwo4NmSDEVAdNeLifrFeQhQo1rO5Hn1KHDzqa133XQGyrj5rPOPgMZy1fnsEi10 0cRhdxw5Kivh+Nxo79kHxMAh2KQ6CBR1VWb4KhBwthANX4AGkxShJhIVxwlnJ47LuUv/ 8ugUeRLIr6R+ZhNwFtsth3WAFdQOmfxzt+Kfg6ygg+DJmrkxyinRVYpuiN52ojZ1pcGD 67zA== X-Gm-Message-State: AOAM533x/+iSE87tJ6IhlFXwQWL9uQq/17RBkCVecIJCyxTb0fe/wy3q U0CehKacXeOLPUtzXrTQb3Qp66DrWKUk0SjCaTZhzGB2Gy5jUQ== X-Google-Smtp-Source: ABdhPJxSBXBvX/j5mLbqyTTR+4U3HMgp+EqxBjkitllXbZbMagdXEYNBU5tFN5ovuPZbFhvD437lIQMTG9jg6jkKREA= X-Received: by 2002:a05:6830:2106:: with SMTP id i6mr9054402otc.260.1613331202179; Sun, 14 Feb 2021 11:33:22 -0800 (PST) MIME-Version: 1.0 References: <20210128102816.GB578422@zira.vinc17.org> <560cef52-aee7-352a-2ba3-25826fe54136@eastlink.ca> <14ce37b2-35ca-6002-474a-7de5d6626a66@eastlink.ca> <05c3d2ba-6a00-9480-e2a8-685432e2442c@eastlink.ca> <20210214173138.GA2298446@zira.vinc17.org> In-Reply-To: <20210214173138.GA2298446@zira.vinc17.org> From: Bart Schaefer Date: Sun, 14 Feb 2021 11:33:11 -0800 Message-ID: Subject: Re: detect pipe To: Zsh Users Content-Type: text/plain; charset="UTF-8" X-Seq: 26513 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Sun, Feb 14, 2021 at 9:31 AM Vincent Lefevre wrote: > > Closing stdin is a bad idea, as this can break stdout redirection, > and this may be out of control of the commands. See > > https://sourceware.org/bugzilla/show_bug.cgi?id=682 IMO that's just silly. If stdin/stdout were never supposed to be closed, why has the standard shell had <&- and >&- for its entire existence? Why wouldn't those be syntax errors when a file descriptor number is not provided if you're never supposed to use them?