parallel: base64_zip_eval written shorter so it might fit in csh's 1000 byte limit.

This commit is contained in:
Ole Tange 2016-08-04 00:04:06 +02:00
parent 223cdb4754
commit 393cfd177a

View file

@ -7073,14 +7073,15 @@ sub base64_zip_eval {
# Returns: # Returns:
# $script = 1-liner for perl -e # $script = 1-liner for perl -e
my $script = ::spacefree(0,q{ my $script = ::spacefree(0,q{
@GNU_Parallel=("use","IPC::Open3;","use","MIME::Base64"); @GNU_Parallel=split /_/,"use_IPC::Open3;_use_MIME::Base64";
eval "@GNU_Parallel"; eval"@GNU_Parallel";
$SIG{CHLD}="IGNORE"; $SIG{CHLD}="IGNORE";
# Search for bzip2. Not found => use default path # Search for bzip2. Not found => use default path
my $zip = (grep { -x $_ } "/usr/local/bin/bzip2")[0] || "bzip2"; my $zip = (grep { -x $_ } "/usr/local/bin/bzip2")[0] || "bzip2";
# $in = stdin on $zip, $out = stdout from $zip # $in = stdin on $zip, $out = stdout from $zip
my($in, $out,$eval); # Forget my() to save chars for csh
# my($in, $out,$eval);
open3($in,$out,">&STDERR",$zip,"-dc"); open3($in,$out,">&STDERR",$zip,"-dc");
if(my $perlpid = fork) { if(my $perlpid = fork) {
close $in; close $in;