From c39bd78c199fc4f6bac463756f810ff6f19e4184 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 27 Dec 2010 02:32:18 +0100 Subject: open3 --- pdftool.pl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pdftool.pl b/pdftool.pl index 42e792d..40a5559 100755 --- a/pdftool.pl +++ b/pdftool.pl @@ -416,7 +416,7 @@ open *IN, "<&PSIN" or die "Can't dup: $!"; if (defined $select) { @cmd = ('psselect', "-p$select"); push @cmd, '-q' if defined $quiet; - my $pid = open2 *OUT, "<&IN", @cmd; + my $pid = open3 "<&IN", *OUT, ">&LOG", @cmd; push @pids, [$pid, @cmd]; open *IN, "<&OUT" or die "Can't dup: $!"; } @@ -531,7 +531,7 @@ if (defined $book) { @cmd = ('psbook'); push @cmd, '-q' if defined $quiet; - my $pid = open2 *OUT, "<&IN", @cmd; + my $pid = open3 "<&IN", *OUT, ">&LOG", @cmd; open *IN, "<&OUT" or die "Can't dup: $!"; push @pids, [$pid, @cmd]; } @@ -556,7 +556,7 @@ my @specs = &calc_specs ($horiz, $vert, $rotate, $scale, my $pagespecs = "$nup:" . join ('+', @specs); @cmd = ('pstops', '-w', $bbox[2], '-h', $bbox[3], $pagespecs); push @cmd, '-q' if defined $quiet; -my $pid = open2 *OUT, "<&IN", @cmd; +my $pid = open3 "<&IN", *OUT, ">&LOG", @cmd; open *IN, "<&OUT" or die "Can't dup: $!"; push @pids, [$pid, @cmd]; @@ -569,7 +569,7 @@ push @pids, [$pid, @cmd]; "-dNOPAUSE", "-dAutoRotatePages=/None", "-c", "<< /Orientation $rotate /PageSize [$outwidth $outheight] >> setpagedevice", "-f", "-"); -$pid = open2 ">&FOUT", "<&IN", @cmd; +$pid = open3 "<&IN", ">&FOUT", ">&LOG", @cmd; push @pids, [$pid, @cmd]; -- cgit v1.2.3