Package: munin
Version: 1.2.3-1
Severity: minor
Tags: patch

Hi,

the contact command redirections don't work as expected, stderr is
logged as stdout, while stdout is simply dropped.  Closing stderr at the
beginning also confuses things.  I provide a simple patch to straighten
it out.

Thanks,
Feri.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (50, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.12-1-k7
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages munin depends on:
pn  libdigest-md5-perl                       Not found.
ii  libhtml-template-perl      2.6-2         HTML::Template : A module for usin
ii  libparse-recdescent-perl   1.94-4        Generates recursive-descent parser
ii  librrds-perl               1.0.49-1      Time-series data storage and displ
pn  libtime-hires-perl                       Not found.
ii  perl [libstorable-perl]    5.8.4-8sarge4 Larry Wall's Practical Extraction 
ii  perl-modules               5.8.4-8sarge4 Core Perl modules

-- no debconf information
--- /usr/share/munin/munin-limits       2006-08-24 18:32:33.000000000 +0200
+++ munin-limits        2006-08-30 19:52:17.000000000 +0200
@@ -500,8 +500,6 @@
                            }
                            exit 0;
                        }
-                       close (STDOUT);
-                       *STDOUT = \$logstdout;
                        my $logpid = open ($logstderr, "|-");
                        if (!defined $logpid)
                        {
@@ -517,8 +515,8 @@
                            }
                            exit 0;
                        }
-                       close (STDERR);
-                       *STDERR = \$logstderr;
+                       open (STDOUT, ">&", $logstdout);
+                       open (STDERR, ">&", $logstderr);
 
                        exec (@cmd[1 .. $#cmd]) or logger ("Warning: Could not 
run command \"" . join(' ',@cmd[1 .. $#cmd]) . "\": $!");
                        exit 5;
@@ -625,9 +623,7 @@
          }
          else
          {
-                 close (STDERR);
-                 *STDERR = \$log;
-               
+                 open (STDERR, ">&", $log);
          }
     }
 }

Reply via email to