[systemd-devel] [PATCH 1/2] Do not set LANG=C in every child environment.

harald at redhat.com harald at redhat.com
Thu Jun 27 02:26:35 PDT 2013


From: Harald Hoyer <harald at redhat.com>

LANG does not have to be set and setting it to default to the default
does not add any value.
---
 src/core/locale-setup.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
index d7113b9..daf81d0 100644
--- a/src/core/locale-setup.c
+++ b/src/core/locale-setup.c
@@ -117,14 +117,6 @@ int locale_setup(void) {
                         log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
         }
 
-        if (!variables[VARIABLE_LANG]) {
-                variables[VARIABLE_LANG] = strdup("C");
-                if (!variables[VARIABLE_LANG]) {
-                        r = -ENOMEM;
-                        goto finish;
-                }
-        }
-
         for (i = 0; i < _VARIABLE_MAX; i++) {
                 if (variables[i]) {
                         if (setenv(variable_names[i], variables[i], 1) < 0) {
-- 
1.8.3.1



More information about the systemd-devel mailing list