From 6fcacdf148ce7cb51e595acc3ee521c5a0cf173c Mon Sep 17 00:00:00 2001 From: Bram Matthys Date: Mon, 21 Jan 2019 13:30:15 +0100 Subject: [PATCH] Fix './unrealircd backtrace' not working correctly in non-English environments. The script symlinks any missing tmp/xxxx.so's to the real module name but depends on English statements (ugly, yeah, but it works). With a non-English locale this did previously not work so the backtrace was screwed. --- src/version.c.SH | 1 + unrealircd.in | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/src/version.c.SH b/src/version.c.SH index 2f270ef47..e3d34a0c0 100644 --- a/src/version.c.SH +++ b/src/version.c.SH @@ -18,6 +18,7 @@ fi generation=`expr $generation + 1` export LANG=C export LC_TIME=C +export LC_ALL=C creation=`date | \ awk '{if (NF == 6) \ { print $1 " " $2 " " $3 " " $6 " at " $4 " " $5 } \ diff --git a/unrealircd.in b/unrealircd.in index fabcdaf9a..e1c3ca3e4 100644 --- a/unrealircd.in +++ b/unrealircd.in @@ -163,6 +163,11 @@ elif [ "$1" = "backtrace" ] ; then exit 1 fi + # This is needed for the script below and is probably also helpful for the + # bug report since you usually want to paste this to the development team. + export LANG=C + export LC_ALL=C + # The tmp/*.so files are often already deleted. Here we have some # (ugly) scripting to recreate the tmp/*.so links to the modules *.so files... echo 'info sharedlibrary'|gdb @BINDIR@/unrealircd $corefile 2>/dev/null|\