aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2020-12-08 16:03:23 +0100
committerGuilhem Moulin <guilhem@fripost.org>2020-12-08 16:03:23 +0100
commit1630f2387c52a0ac460922eda6535165fdb279d1 (patch)
tree84b5385c45e36bc3ce5ad0d9c07c3b80db0b0364
parentb5a74469e5c5e828d5799ae4a66d70347f8aa8a6 (diff)
libinterimap: 'debug' forces 'null-stderr' = 0.
The standard error is never sent to /dev/null in debug mode. Closes: deb#968392
-rw-r--r--Changelog7
-rw-r--r--doc/interimap.1.md3
-rw-r--r--lib/Net/IMAP/InterIMAP.pm2
3 files changed, 10 insertions, 2 deletions
diff --git a/Changelog b/Changelog
index 6ee44fc..6dca6b4 100644
--- a/Changelog
+++ b/Changelog
@@ -1,3 +1,10 @@
+interimap (0.5.3) upstream;
+
+ - libinterimap: 'null-stderr' is now ignored when the 'debug' flag is
+ set (the standard error is never sent to /dev/null).
+
+ -- Guilhem Moulin <guilhem@fripost.org> Tue, 08 Dec 2020 15:58:22 +0100
+
interimap (0.5.2) upstream;
- Makefile: remove 'smart' extension from pandoc call to generate
diff --git a/doc/interimap.1.md b/doc/interimap.1.md
index de39880..c70698b 100644
--- a/doc/interimap.1.md
+++ b/doc/interimap.1.md
@@ -376,7 +376,8 @@ Valid options are:
*null-stderr*
: Whether to redirect *command*'s standard error to `/dev/null` for
- `type=tunnel`. (Default: `NO`.)
+ `type=tunnel`. This option is ignored when the `--debug` flag is
+ set. (Default: `NO`.)
*SSL_protocols*
diff --git a/lib/Net/IMAP/InterIMAP.pm b/lib/Net/IMAP/InterIMAP.pm
index 8b69e12..bd14625 100644
--- a/lib/Net/IMAP/InterIMAP.pm
+++ b/lib/Net/IMAP/InterIMAP.pm
@@ -329,7 +329,7 @@ sub new($%) {
open STDOUT, '>&', $s or $self->panic("Can't dup: $!");
my $stderr2;
- if ($self->{'null-stderr'} // 0) {
+ if (($self->{'null-stderr'} // 0) and !($self->{debug} // 0)) {
open $stderr2, '>&', *STDERR;
open STDERR, '>', '/dev/null' or $self->panic("Can't open /dev/null: $!");
}