diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2013-01-22 11:25:02 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2013-01-22 11:25:02 +0100 |
commit | 8bcc1da2f3f8e5f62af7b9e3a0967f7d1a60b582 (patch) | |
tree | 256a86048be37c03b349a21cc18d51a01438a398 /libdaemon | |
parent | 142c4bf9f04a46daf1c3d94581b43ec7c481ba59 (diff) | |
download | lvm2-8bcc1da2f3f8e5f62af7b9e3a0967f7d1a60b582.tar.gz |
locales: use higher prio LC_ALL variable
For reseting locale environment into significantly less memory
consuming version 'C' - use LC_ALL instead of LANG since it has
higher priority in locale settings.
Otherwise we may observe whole locale-archive which might be
over 100MB on i.e. Fedora systems locked in memory with
some daemons.
Diffstat (limited to 'libdaemon')
-rw-r--r-- | libdaemon/server/daemon-server.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c index 0237465e4..735a0ea46 100644 --- a/libdaemon/server/daemon-server.c +++ b/libdaemon/server/daemon-server.c @@ -456,8 +456,8 @@ void daemon_start(daemon_state s) * some glibc (on some distributions it takes over 100MB). Some daemons * need to use mlockall(). */ - if (setenv("LANG", "C", 1)) - perror("Cannot set LANG to C"); + if (setenv("LC_ALL", "C", 1)) + perror("Cannot set LC_ALL to C"); #ifdef linux _systemd_activation = _systemd_handover(&s); |