Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 May 2013 11:48:47 +0200
From:      =?UTF-8?Q?V=C3=A1clav_Zeman?= <vhaisman@gmail.com>
To:        Reid Linnemann <linnemannr@gmail.com>
Cc:        rank1seeker@gmail.com, hackers@freebsd.org
Subject:   Re: /bin/sh => STDIN & functions, var scope messing
Message-ID:  <CAKw7uVjty2cJXT_QmexxKdRQyiKoHYMK1E-TjSHa5TCX1S8Bbg@mail.gmail.com>
In-Reply-To: <CA%2B0MdpOcz7aw03HCrbxZVt1cnWdR4shqWaEfBrQkCpPnbgXLPQ@mail.gmail.com>
References:  <20130527.194235.693.1@DOMY-PC> <CA%2B0MdpOcz7aw03HCrbxZVt1cnWdR4shqWaEfBrQkCpPnbgXLPQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 27 May 2013 21:58, Reid Linnemann wrote:
> from SH(1)
>
> "Note that unlike some other shells, sh executes each process in a pipe-
>      line with more than one command in a subshell environment and as a
> child
>      of the sh process."
>
> I'm taking this to mean that redirecting to sh_f has sh_f execute in a
> subshell in which global_scope_var changes, but the original shell's copy
> is uncahnged.
Curious. Which of the two behaviours is POSIXly correct?


--
VZ



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAKw7uVjty2cJXT_QmexxKdRQyiKoHYMK1E-TjSHa5TCX1S8Bbg>