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>
This commit is contained in:
Denys Vlasenko 2014-08-11 20:33:18 +02:00
parent feac9b607d
commit 45b4ecc868

View File

@ -184,8 +184,7 @@ void lbb_prepare(const char *applet
#endif #endif
applet_name = applet; applet_name = applet;
/* Set locale for everybody except 'init' */ if (ENABLE_LOCALE_SUPPORT)
if (ENABLE_LOCALE_SUPPORT && getpid() != 1)
setlocale(LC_ALL, ""); setlocale(LC_ALL, "");
#if ENABLE_FEATURE_INDIVIDUAL #if ENABLE_FEATURE_INDIVIDUAL