From: Jakub Narebski Date: Sat, 09 Sep 2006 22:20:09 GMT Subject: Re: [PATCH] gitweb: support perl 5.6 Message-ID: In-Reply-To: <20060909145914.GA25289@liacs.nl> Sven Verdoolaege wrote: > +# returns pipe reading from git command with given arguments > +sub git_pipe { > +       open my $fd, "-|", join(' ', git_cmd(), @_) or return undef; > +       return $fd; > +} > + I'm sorry, but this is not enough. For example the $file_name argument should be quoted in shell, i.e. in three argument magic open "-|". So either you return to your old patch, which changes each list form of open "-|" into old three argument form (which adds penalty of additional shell invocation, and is prone to shell interpretation of arguments), and sometimes add quotes (e.g. "... \'$file_name\' ..."), or (what would be better) to reimplement list form of open "-|" using two argument forking open "-|", and doing exec in child, a la "Safe Pipe Opens" in perlipc(3pm). -- Jakub Narebski Warsaw, Poland ShadeHawk on #git