From 45b4ecc8689d1291b01793efab3ac25125e14e48 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 11 Aug 2014 20:33:18 +0200 Subject: [PATCH] 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 --- libbb/appletlib.c | 3 +-- 1 file changed, 1 insertion(+), 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 #endif applet_name = applet; - /* Set locale for everybody except 'init' */ - if (ENABLE_LOCALE_SUPPORT && getpid() != 1) + if (ENABLE_LOCALE_SUPPORT) setlocale(LC_ALL, ""); #if ENABLE_FEATURE_INDIVIDUAL -- 2.25.1