delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; q=dns; s=default; b=a9zcPeIDVcLN7PQE | |
PHN++1GUEJhckxDENEb1pMO+B8jnDYW6c6Cxa4T+nkZDSs4LHbbZSiX1X0K3dWQf | |
iBgcZGfgLiMzbxuJNswprIa5WBMOjRGEH0ptMT3QgOYEgGiXd2vQWMQCgzizQuRc | |
6k+8sEbQRmXL5p6j2OVIChe+lE8= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:subject:to:references:from:message-id:date | |
:mime-version:in-reply-to:content-type | |
:content-transfer-encoding; s=default; bh=V2/QT0RO2CJKuQN89rCYjo | |
Uhelg=; b=b9dZGM9JuB2nJCwW0iqI6tVI74pQhMNRC4FTEM2H2OhcLXIbIzxecx | |
zIiWqvdQYfO7V0R5o98pkscfdHZtOHcrplItiTmo6KjaRD8/3uuVNkpjGIFu4zjs | |
cPKuXQbXRWrDdEQmTAvJmR3gUKOFq/x+JfQpAeklKv8i1Gf6oRjxM= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Spam-SWARE-Status: | No, score=0.3 required=5.0 tests=BAYES_05,HTML_MESSAGE,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL autolearn=no version=3.3.2 spammy=Shell, H*u:5.1, H*UA:en-US, H*u:en-US |
X-HELO: | sonic302-4.consmr.mail.bf2.yahoo.com |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1532216201; bh=r5HYNPZ4WFGzqDLxfATDrH5+pbHXh5ntm/mhkycukuY=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=V7Tle2fXrxpDjr4mufef5ZTgn+Wj9ydRW7ek3XOS79scO5ZJuwPE5CBOm9lu0sHn730rpgJg0zj+dCK4LfktdBY9dsRxVGy8E80SMxInksB+YTKEPjNiYEu1C8dOxVb3Ai2GjaDj2RlrEgHj0BfR0X/+zXiY/c/sr8MJuHuHukj/dZqpvg8bplP9UHdwC6iUDX4/kvpyCNSNoayFxP8wlMgYm7xHWy79ePlzySYgFCO+s+kBh67ctTyHPZUzZoSZDdykffOtamut3J4Wz8SCKpQN8wegSDh5+yflYIxc9sjHnrJR7Rinep9UDxZv+vZCMG+C/Yl1WOVf/FgR8V0urg== |
Subject: | Re: BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe [edit] documentation bug |
To: | cygwin AT cygwin DOT com |
References: | <69b0bc3c-7ead-920e-f04b-ec631c3453b7 AT verizon DOT net> <2beb175e-2291-6b12-6efd-c84704f6762f AT verizon DOT net> <07814e3d-d637-47c2-74fd-cb2916c29099 AT redhat DOT com> |
From: | BloomingAzaleas <rdbingham AT verizon DOT net> |
Message-ID: | <30b851ee-7144-345c-926d-8a08d9a6a27c@verizon.net> |
Date: | Sat, 21 Jul 2018 19:36:38 -0400 |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 |
MIME-Version: | 1.0 |
In-Reply-To: | <07814e3d-d637-47c2-74fd-cb2916c29099@redhat.com> |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id w6LNasai019415 |
Reply to Eric Blake, At this time, I do not have a Linux image available to me.  If you saw the same behavior on Fedora, then I suggest the behavior originates upstream at or close the the GNU source-code level. Mr. Penny's response asserted the observed behavior "is intended behavior", in which case there should exist a GNU specification document describing the intended pipe STDIN re-direction restrictions for 'mapfile', 'read' and possibly other "builtins". Lacking such a reference nothing can be said about intent. Implementation-as-intent implies errors and conceptual and behavioral inconsistencies in the implementation were intended. I decline to think that of the distributed BASH maintenance team. He provided a reference to http://mywiki.wooledge.org/BashFAQ/024, where, if you read the page, the behavior inconsistency I reported is shown under the heading of "More broken stuff:". I take that "More broken stuff:" opinion to mean yet others read the same surface discrepancy between doc and behavior as I did. I believe what we have at this point is: A) GNU doc lacking nuance, attention to consistent terminology, and helpful rule-statement to code example/counter-example illustrations adjacent to rule statements. For a doc counter-example, the Open Group doc at http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html does make an effort to distinguish behaviors between "2.14 Special Built-In Utilities" and "2.9.1 Simple Commands" whereas the GNU doc indiscriminately mixes the words "commands" (section 3.2) and "builtin" and "command" and the phrase "builtin command" (section 4) as if their behaviors are identical under the section 4 title of "Shell Builtin Commands" (https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html#Shell-Builtin-Commands). The GNU doc for shopt lastpipeis fairly opaque unless you have deep knowledge and that knowledge is cued when considering the possible meanings of "current shell environment" for built-ins (same process) vs. external child-process executables. B) However conceptually inconsistent, an obsessive BASH doc reader could imply the observed bash built-ins behavior by integrating multiple hints and rule statements scattered across the GNU doc and then, crucially, doubting the plain meaning of the unqualified doc statements of "Read lines from the standard input..." . Thank you for your response. Regards, UN*X Since '85 On 7/20/2018 12:08 PM, Eric Blake wrote: > On 07/17/2018 08:52 PM, BloomingAzaleas wrote: >> Reply to Steven Penny <svnpenn at gmail dot com>: >> >>    no mis-behaving: this is intended behavior - you yourself >> have given >>    workarounds: either redirect output to a file that can be >> later read, or pipe to >>    command grouping ala {} or () and read stdin from inside >> the subshell >> > >> I suggest the following adjustment to the man pages inserting >> a parenthetical cue regards behavior in pipes: > > Is the behavior you are complaining about unique to Cygwin, or > can it be reproduced on a GNU/Linux box? If the latter, then > an upstream bug report is better than asking for a > cygwin-specific patch. [Hint - as the maintainer of the cygwin > bash port, I don't recall adding any cygwin-specific tweaks for > mapfile - and a quick test on Fedora shows the same behaviors] > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |