With the restoration of corrupt utf8 multibyte editing
to the library, it's important to establish the proper
locale before calling that 'fatal_proc_unmounted' guy.
He calls the original 'look_up_our_self' who, in turn,
will invoke 'stat2proc' which then calls 'escape_str'.
Once there, it's too late to effect changes to locale.
[ the result would be lots and lots of '?' displayed ]
Signed-off-by: Jim Warner <james.warner@comcast.net>
atexit(close_stdout);
- // is /proc mounted?
- fatal_proc_unmounted(NULL, 0);
-
// setup our program name
Myname = strrchr(me, '/');
if (Myname) ++Myname; else Myname = me;
// accommodate nls/gettext potential translations
+ // ( must 'setlocale' before our libproc called )
initialize_nls();
+ // is /proc mounted?
+ fatal_proc_unmounted(NULL, 0);
+
#ifndef OFF_STDERROR
/* there's a chance that damn libnuma may spew to stderr so we gotta
make sure he does not corrupt poor ol' top's first output screen!