diff options
author | Peter Palfrader <peter@palfrader.org> | 2004-04-24 14:55:49 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2004-04-24 14:55:49 +0000 |
commit | 544856338d731e08a8ae00e694aa8cc2a45d141d (patch) | |
tree | aebceeec67e955bc4fca215b5f2b3152e032d1b8 /Echolot/Stats.pm | |
parent | 75da8751b1e5a5a39f8743b44971224b0ab34c31 (diff) |
Switch to a common readwrite_gpg()
Diffstat (limited to 'Echolot/Stats.pm')
-rw-r--r-- | Echolot/Stats.pm | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm index 31eb2b6..0d97783 100644 --- a/Echolot/Stats.pm +++ b/Echolot/Stats.pm @@ -861,13 +861,7 @@ sub build_pgpring_type($$$$) { commands => [ '--import' ], command_args => [qw{--no-options --no-secmem-warning --no-default-keyring --fast-list-mode --keyring}, $keyring, '--', '-' ], handles => $handles ); - print $stdin_fh $key{'key'}; - close($stdin_fh); - - my $stdout = join '', <$stdout_fh>; close($stdout_fh); - my $stderr = join '', <$stderr_fh>; close($stderr_fh); - my $status = join '', <$status_fh>; close($status_fh); - + my ($stdout, $stderr, $status) = readwrite_gpg($key{'key'}, $stdin_fh, $stdout_fh, $stderr_fh, $status_fh); waitpid $pid, 0; ($stdout eq '') or @@ -895,12 +889,7 @@ sub build_pgpring_export($$$$) { commands => [ '--export' ], command_args => [qw{--no-options --no-secmem-warning --no-default-keyring --keyring}, $keyring, @$keyids ], handles => $handles ); - close($stdin_fh); - - my $stdout = join '', <$stdout_fh>; close($stdout_fh); - my $stderr = join '', <$stderr_fh>; close($stderr_fh); - my $status = join '', <$status_fh>; close($status_fh); - + my ($stdout, $stderr, $status) = readwrite_gpg('', $stdin_fh, $stdout_fh, $stderr_fh, $status_fh); waitpid $pid, 0; open (F, ">$file") or |