Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: Dan Douglas <ormaaj@...>
Subject: lastpipe
Date: Fri, 25 May 2012 15:02:32 -0500
As many are probably aware, Bash 4.2 adds a shopt feature to enable not 
running the last command of a pipeline in a subshell (POSIX leaves it up to 
the shell to decide). Aside from being a slight optimization, it allows some 
syntactic convenience such as reduced reliance upon process substitutions and 
redundant command grouping workarounds. I believe it is generally considered 
that the lastpipe behavior is superior. zsh and ksh do this by default, while 
mksh, bash, and dash do not. Only Bash has it as a configurable option.

If it were made a policy now that ebuilds and eclasses cannot depend upon the 
subshell (for example, to set temporary positional parameters or isolate 
temporary variables), then maybe someday in the distant future this could be 
made the default, and in the meantime, an option for those with new enough 
shells. Since dependence on the subshell isn't very common, I think this 
should be feasible, and of course as a workaround all that's required is to 
wrap any such commands in parentheses.

Any opinions?
-- 
Dan Douglas
Attachment:
signature.asc (This is a digitally signed message part.)
Replies:
Re: lastpipe
-- Ciaran McCreesh
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
new qa warning: append-flags will complain about preprocessor flags
Next by thread:
Re: lastpipe
Previous by date:
new qa warning: append-flags will complain about preprocessor flags
Next by date:
Re: lastpipe


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.