[check_postgres] [commit] Use fileglob ref instead of STDERR bareword. Thanks to Chris Butler.

check_postgres at bucardo.org check_postgres at bucardo.org
Tue Sep 23 14:00:32 UTC 2008


Committed by Greg Sabino Mullane <greg at endpoint.com>

Use fileglob ref instead of STDERR bareword. Thanks to Chris Butler.

---
 check_postgres.pl |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/check_postgres.pl b/check_postgres.pl
index 5ae17ef..8859502 100755
--- a/check_postgres.pl
+++ b/check_postgres.pl
@@ -28,7 +28,7 @@ $Data::Dumper::Varname = 'POSTGRES';
 $Data::Dumper::Indent = 2;
 $Data::Dumper::Useqq = 1;
 
-our $VERSION = '2.1.4';
+our $VERSION = '2.1.5';
 
 use vars qw/ %opt $PSQL $res $COM $SQL $db /;
 
@@ -916,7 +916,7 @@ sub run_command {
 		alarm 0;
 
 		my $start = $opt{showtime} ? [gettimeofday()] : 0;
-		open my $oldstderr, '>&', STDERR or ndie "Could not dupe STDERR\n";
+		open my $oldstderr, '>&', \*STDERR or ndie "Could not dupe STDERR\n";
 		open STDERR, '>', $errorfile or ndie qq{Could not open STDERR?!\n};
 		eval {
 			alarm $timeout;
@@ -3292,7 +3292,7 @@ sub check_replicate_row {
 =head1 NAME
 
 B<check_postgres.pl> - a Postgres monitoring script for Nagios, MRTG, and others
-This documents describes check_postgres.pl version 2.1.4
+This documents describes check_postgres.pl version 2.1.5
 
 =head1 SYNOPSIS
 
@@ -4364,6 +4364,10 @@ Items not specifically attributed are by Greg Sabino Mullane.
 
 =over 4
 
+=item B<Version 2.1.5> (September 23, 2008)
+
+ Don't use STDERR bareword. (Chris Butler)
+
 =item B<Version 2.1.4> (September 22, 2008)
 
  Fix for race condition in txn_time action.
-- 
1.5.5.4



More information about the Check_postgres mailing list