Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH v3 1/1] exec: run final pipeline command in a subshell in sh mode



On Sat, Apr 3, 2021, at 11:49 AM, Lawrence Velázquez wrote:
> On Sat, Mar 27, 2021, at 3:34 PM, Lawrence Velázquez wrote:
> > On Sun, Jan 3, 2021, at 7:22 PM, brian m. carlson wrote:
> > > zsh typically runs the final command in a pipeline in the main shell
> > > instead of a subshell.  However, POSIX specifies that all commands in a
> > > pipeline run in a subshell, but permits zsh's behavior as an extension.
> > > The default /bin/sh implementations on various Linux distros and the
> > > BSDs always use a subshell for all components of a pipeline.
> > > 
> > > Since zsh may be used as /bin/sh in some cases (such as macOS Catalina),
> > > it makes sense to have the common sh behavior when emulating sh, so do
> > > that by checking for being the final item of a multi-item pipeline and
> > > creating a subshell in that case.
> > 
> > ping for review
> 
> Ping: 2.0 You Can (Not) Review

The Ping for Review Part III

vq




Messages sorted by: Reverse Date, Date, Thread, Author