From 1630f2387c52a0ac460922eda6535165fdb279d1 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Tue, 8 Dec 2020 16:03:23 +0100 Subject: libinterimap: 'debug' forces 'null-stderr' = 0. The standard error is never sent to /dev/null in debug mode. Closes: deb#968392 --- Changelog | 7 +++++++ doc/interimap.1.md | 3 ++- lib/Net/IMAP/InterIMAP.pm | 2 +- 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 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: $!"); } -- cgit v1.2.3