Re: [PATCH] fmt-merge-msg: avoid open "-|" list form for Perl 5.6
- From
- Eric Wong <normalperson@yhbt.net>
- Date
- Feb 21, 2006, 22:35 UTC
- Message-ID
- <20060221223535.GC18085@hand.yhbt.net>
- In-Reply-To
- <Pine.LNX.4.63.0602212315400.12634@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 34 quoted lines
> Hi, > > On Tue, 21 Feb 2006, Alex Riesen wrote: > > > Sam Vilain, Tue, Feb 21, 2006 21:36:50 +0100: > > > > > > > >>* Eric, thanks for the hint. I have this four-patch series. > > > >> Could people with perl 5.6 please check them? > > > > > > > > > > > >Does not work here (ActiveState Build 811, Perl 5.8.6): > > > > > > > >$ perl -e 'open(F, "-|")' > > > >'-' is not recognized as an internal or external command, > > > >operable program or batch file. > > > > > > Portability, Ease of Coding, Few CPAN Module Dependencies. Pick any two. > > > > > > > Sometimes an upgrade is just out of question. Besides, that'd mean an > > upgrade to another operating system, because very important scripts > > over here a just not portable to anything else but > > "ActiveState Perl on Windows (TM)" > > I just have no choice. > > Maybe I am stating the obvious, but it seems that > > open (F, "git-blabla -option |"); > > would be more portable. > > Alex, would this work on ActiveState? > > Perl gurus, is the latter way to open a pipe considered awful or what?
It's OK as long as all arguments are are shell-safe (quoted/escaped properly). Shouldn't be a problem with constant strings at all.
> P.S.: Eric, we rely on fork() anyway. Most of git's programs just don't > work without a fork().
Yes, apparently there's some fork() emulation in some *doze places and not others.
-- Eric Wong