Gentoo Archives: gentoo-dev

From: Mike Frysinger <vapier@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] lastpipe
Date: Sat, 26 May 2012 00:51:21
In Reply to: Re: [gentoo-dev] lastpipe by Ciaran McCreesh
On Friday 25 May 2012 18:33:43 Ciaran McCreesh wrote:
> On Fri, 25 May 2012 15:02:32 -0500 Dan Douglas wrote: > > 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. > > We'll be able to turn that on in a controlled way in EAPI 6. Having > said that, if we're reaching the point where speed of bash code is > at all relevant, then ebuilds are doing something wrong...
i don't think speed is the main motivator, but rather avoiding behavior that bites new people all the time: count=0 printf '%s\n' a b c | \ while read line ; do : $(( count++ )) done echo $count w/out lastpipe, that shows 0. w/lastpipe, that shows 3. -mike


File name MIME type
signature.asc application/pgp-signature


Subject Author
Re: [gentoo-dev] lastpipe Dan Douglas <ormaaj@×××××.com>