summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNiko Tyni <ntyni@iki.fi>2007-03-10 19:40:25 +0100
committerNiko Tyni <ntyni@iki.fi>2007-03-10 19:40:25 +0100
commitf791cc4b4470c90ac8b4fd2205a840d0f222513e (patch)
tree7859a0336a5ba5c2502b314edd0b282eaa60d1b8 /lib
parent77692aa0168d42f9db7bcef9c40ee1cb4dbf5734 (diff)
downloadsmokeping-f791cc4b4470c90ac8b4fd2205a840d0f222513e.tar.gz
smokeping-f791cc4b4470c90ac8b4fd2205a840d0f222513e.tar.xz
bail out at startup with an error message if LC_ALL is set
Diffstat (limited to 'lib')
-rw-r--r--lib/Smokeping.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Smokeping.pm b/lib/Smokeping.pm
index 9f8c8a7..6721a1b 100644
--- a/lib/Smokeping.pm
+++ b/lib/Smokeping.pm
@@ -20,7 +20,10 @@ setlogsock('unix')
# make sure we do not end up with , in odd places where one would expect a '.'
# we set the environment variable so that our 'kids' get the benefit too
$ENV{LC_NUMERIC}='C';
-POSIX::setlocale(&POSIX::LC_NUMERIC,"");
+if (POSIX::setlocale(&POSIX::LC_NUMERIC,"") ne "C") {
+ die("Resetting LC_NUMERIC failed - try removing LC_ALL from the environment");
+}
+
use File::Basename;
use Smokeping::Examples;