summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-11-09 16:51:10 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-11-09 16:51:10 +0100
commit6abf178eba9c17c43f388f3cdf509f6e3ef7cc7f (patch)
tree15a57d86ca1a9907d80f5b359ce92fd848eab1b8 /lib/Plugins/CCpp.cpp
parent430072884e772320064a7c91c5fee3178e255057 (diff)
parentfc8e94118cdf9a0b421a7face867c39d84aa3d94 (diff)
downloadabrt-6abf178eba9c17c43f388f3cdf509f6e3ef7cc7f.tar.gz
abrt-6abf178eba9c17c43f388f3cdf509f6e3ef7cc7f.tar.xz
abrt-6abf178eba9c17c43f388f3cdf509f6e3ef7cc7f.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 1ab0e64..5f87235 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -127,6 +127,18 @@ static pid_t ExecVP(char** pArgs, uid_t uid, std::string& pOutput)
setreuid(uid, uid);
setsid();
+ /* Nuke everything which may make setlocale() switch to non-POSIX locale:
+ * we need to avoid having gdb output in some obscure language.
+ */
+ unsetenv("LANG");
+ unsetenv("LC_ALL");
+ unsetenv("LC_COLLATE");
+ unsetenv("LC_CTYPE");
+ unsetenv("LC_MESSAGES");
+ unsetenv("LC_MONETARY");
+ unsetenv("LC_NUMERIC");
+ unsetenv("LC_TIME");
+
execvp(pArgs[0], pArgs);
/* VERB1 since sometimes we expect errors here */
VERB1 perror_msg("Can't execute '%s'", pArgs[0]);