summaryrefslogtreecommitdiff
path: root/Echolot
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2004-06-14 13:45:16 +0000
committerPeter Palfrader <peter@palfrader.org>2004-06-14 13:45:16 +0000
commitc5b8f52451a60d015e8540b8f79bf4e0f195fc43 (patch)
treea1d5267193dde87ab570ac2044dd47a361c729d4 /Echolot
parent112330b99f5826a16ee9924fda7f4ee79e41352c (diff)
Check if syswrite's return value is defined
Diffstat (limited to 'Echolot')
-rw-r--r--Echolot/Tools.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/Echolot/Tools.pm b/Echolot/Tools.pm
index 157a61a..d1a10a2 100644
--- a/Echolot/Tools.pm
+++ b/Echolot/Tools.pm
@@ -325,6 +325,9 @@ sub readwrite_gpg($$$$$) {
for my $wfd (@$readyw) {
Echolot::Log::trace("writing to $wfd.");
$written = $wfd->syswrite($in, length($in) - $offset, $offset);
+ defined ($written) or
+ Echolot::Log::warn("Error while writing to GnuPG: $!"),
+ next;
$offset += $written;
if ($offset == length($in)) {
Echolot::Log::trace("writing to $wfd done.");