mirror of
https://github.com/opnsense/src.git
synced 2026-02-18 18:20:26 -05:00
top: Make locale issues non-fatal.
If the `setlocale()` call fails, emit a warning and sleep briefly so the user has a chance to see the warning before we redraw the screen. Note that we have no way of knowing exactly what is wrong, but at least we can suggest that they check their environment. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D49230 (cherry picked from commit 180065eb09e699820a1e1c45d3d00156e0effe29)
This commit is contained in:
parent
9e7af40094
commit
a4251e93f8
1 changed files with 2 additions and 2 deletions
|
|
@ -266,8 +266,8 @@ main(int argc, const char *argv[])
|
|||
#endif
|
||||
|
||||
if (setlocale(LC_ALL, "") == NULL) {
|
||||
fprintf(stderr, "invalid locale.\n");
|
||||
exit(1);
|
||||
warnx("invalid locale, check your environment");
|
||||
sleep(2);
|
||||
}
|
||||
|
||||
mypid = getpid();
|
||||
|
|
|
|||
Loading…
Reference in a new issue