summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-06-01 22:50:20 +0000
committerPeter Palfrader <peter@palfrader.org>2004-06-01 22:50:20 +0000
commit138bb989160341b1e6cc7e02583e97930a641008 (patch)
treec1a18f8cb83177be7ac897adf3875457d4523c4b
parentdd43e4e9144202912e5932433564282f4d339f43 (diff)
Wait until we have written everything in our select read/write for gpg loop
-rw-r--r--Echolot/Tools.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Echolot/Tools.pm b/Echolot/Tools.pm
index fa96831..157a61a 100644
--- a/Echolot/Tools.pm
+++ b/Echolot/Tools.pm
@@ -318,7 +318,7 @@ sub readwrite_gpg($$$$$) {
my ($stdout, $stderr, $status) = ("", "", "");
my ($readyr, $readyw, $written);
- while ($sout->count() > 0) {
+ while ($sout->count() > 0 || (defined($sin) && ($sin->count() > 0))) {
Echolot::Log::trace("select waiting for ".($sout->count())." fds.");
($readyr, $readyw, undef) = IO::Select::select($sout, $sin, undef, 42);
Echolot::Log::trace("ready: write: ".(scalar @$readyw)."; read: ".(scalar @$readyr));