delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/07/21/20:38:10

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:message-id:date:from:subject:to:references
:content-type; q=dns; s=default; b=KGJ+9iisK1VxuvbuVM3R5sXyDcmgm
dUyROHLu2DmGp+xSeqSSXOWoLX1ge3w4skqbV1Wi3G9oCaGzY2TLsLMDWHkCNtbt
WSt/4NQKbx9yriI1o11AwzMqxRhuGuj4/IX+9PQYoz1Szjz3MM285pttafh83Mlw
MhueCUKnT92xJ0=
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:message-id:date:from:subject:to:references
:content-type; s=default; bh=I2igz68MwHJ2YsIefdvAv1ncS4w=; b=tNX
kXtlOGKAO+jasmuqlByGsYJfyUYD6Zu2JY2cCJHl8h5M2DxYoHZ2kfZFSjx7+WuF
l4CcSOCcXn8Zhc3FcgSaPkNE0aDwXhAiVHo+uWHqA6WGRY0ZS08PUIxFrGNADGB5
p0n/kcUrOenHRwlKlrt3hal6r5L/z0n8XyzLKLcI=
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.0 required=5.0 tests=BAYES_40,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*UA:github.com, H*RU:209.85.218.68, Hx-spam-relays-external:209.85.218.68, H*M:1c69fb81
X-HELO: mail-oi0-f68.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:subject:to:references:user-agent; bh=WzAqo4TbNQmeByo5XYo2NIVOTnbmKewY1CivT/2XG9Y=; b=gbxNpwawakXQGSYckxYYn656rq3d2BmLwGk0x4CDsBwm0KWbekHv5Lgi/UA8/uh+oN iWQNDkg389bKY3mSB/tWQ44j8sDcSfJVicOisUtCeKPj3gVq4QP3xspSk3nPfw6BwRuB 5OubdA5qb6HUBO1ZQCBt4Pr2+Mmz7YNLfkM0KhSaYQoKCY0SB8TvsIBxX5oSxQF9rz6y e8f1OYKRDpwS3s4Wb7OaKi0EFeJkoFjZznETM4xpk6RN6l3TWxllGkc3fHk7izUjfYJK 0ahhpBTD8FBvwfYuoRIVvKghgPvQYXEILJYwrgOdl0u9KpRf6vY52ong9wu3217IQ2AA TbNw==
Message-ID: <5b53d1e2.1c69fb81.54df5.5236@mx.google.com>
Date: Sat, 21 Jul 2018 17:37:54 -0700 (PDT)
From: Steven Penny <svnpenn AT gmail DOT com>
Subject: Re: BASH 4.4 mapfile/readarray/read builtins mis-behaving with pipe [edit] documentation bug
To: cygwin AT cygwin DOT com
References: <30b851ee-7144-345c-926d-8a08d9a6a27c AT verizon DOT net>
User-Agent: Tryst/2.7.0 (github.com/svnpenn/tryst)

On Sat, 21 Jul 2018 19:36:38, BloomingAzaleas wrote:
> At this time, I do not have a Linux image available to me.

its not that hard to get:

1. http://virtualbox.org
2. http://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid

> you saw the same behavior on Fedora, then I suggest the behavior
> originates upstream at or close the the GNU source-code level.

the behavior is documented by POSIX. Command grouping example:

    $ bash -c 'q=2; (q=3); echo "$q"'
    2

and reference:

> Execute compound-list in a subshell environment [...] Variable assignments and
> built-in commands that affect the environment shall not remain in effect after
> the list finishes.

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_01

pipe example:

    $ bash -c 'q=2; echo 3 | read q; echo "$q"'
    2

and reference:

> Changes made to the subshell environment shall not affect the shell
> environment. [...] Additionally, each command of a multi-command pipeline is
> in a subshell environment

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_12

> For a doc counter-example, the Open Group doc at
> http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html

its funny that you list this page, as thats exactly where i got my references.
thanks.

> Thank you for your response.
>
> Regards,
>
> UN*X Since '85

finally i would say to stop top posting. for someone who is self declared unix
for 30 years, it seems odd that you cant even run fedora, or adhere to defacto
mailing list etiquette. Cheers.


--
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019