From 6625e6a0d2a4cec99339b8b526035592dcd4418c Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Mon, 24 Sep 2007 18:45:59 +0000 Subject: Help, usage and version output go to stdout now, rather than stderr git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1795 f882894a-f735-0410-b71e-b25c423dba1c --- lib/Nagios/Plugin/Getopt.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/Nagios/Plugin/Getopt.pm') diff --git a/lib/Nagios/Plugin/Getopt.pm b/lib/Nagios/Plugin/Getopt.pm index 743bf7e..b21dc6d 100644 --- a/lib/Nagios/Plugin/Getopt.pm +++ b/lib/Nagios/Plugin/Getopt.pm @@ -60,9 +60,7 @@ sub _die my $self = shift; my ($msg) = @_; $msg .= "\n" unless substr($msg, -1) eq "\n"; - # Set errno to UNKNOWN for die return code - local $! = 3; - die $msg; + Nagios::Plugin::Functions::_nagios_exit(3, $msg); } # Return the given attribute, if set, including a final newline -- cgit v1.2.3-74-g34f1