diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-08-11 20:33:18 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-08-11 20:33:18 +0200 |
commit | 45b4ecc8689d1291b01793efab3ac25125e14e48 (patch) | |
tree | e1060806668ec1d691b29789077cdf6242afa509 /libbb/appletlib.c | |
parent | feac9b607dc68ea63992a46b3b8361f00f663cdc (diff) | |
download | busybox-w32-45b4ecc8689d1291b01793efab3ac25125e14e48.tar.gz busybox-w32-45b4ecc8689d1291b01793efab3ac25125e14e48.tar.bz2 busybox-w32-45b4ecc8689d1291b01793efab3ac25125e14e48.zip |
init: if libc-based Unicode support is on, run setlocale(LC_ALL, "") at startup
It is not clear why we were excluding init from this.
The "getpid() != 1" clause was there from the beginning (2001)
but not explained.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/appletlib.c')
-rw-r--r-- | libbb/appletlib.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libbb/appletlib.c b/libbb/appletlib.c index f7c416ece..a0150854a 100644 --- a/libbb/appletlib.c +++ b/libbb/appletlib.c | |||
@@ -184,8 +184,7 @@ void lbb_prepare(const char *applet | |||
184 | #endif | 184 | #endif |
185 | applet_name = applet; | 185 | applet_name = applet; |
186 | 186 | ||
187 | /* Set locale for everybody except 'init' */ | 187 | if (ENABLE_LOCALE_SUPPORT) |
188 | if (ENABLE_LOCALE_SUPPORT && getpid() != 1) | ||
189 | setlocale(LC_ALL, ""); | 188 | setlocale(LC_ALL, ""); |
190 | 189 | ||
191 | #if ENABLE_FEATURE_INDIVIDUAL | 190 | #if ENABLE_FEATURE_INDIVIDUAL |