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>
diff --git a/libbb/appletlib.c b/libbb/appletlib.c
index f7c416e..a015085 100644
--- a/libbb/appletlib.c
+++ b/libbb/appletlib.c
@@ -184,8 +184,7 @@
#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