From f3724aef881ff2fdada98eddc792059e4e18c1c8 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Sat, 21 Nov 2015 10:13:10 +0000 Subject: Fix startup crash when using a locale boost does not like There are various locale related bugs in various versions of boost, where exceptions are thrown in boost::filesystem APIs when the current locale is not to boost's liking. It's not clear what "not to boost's liking" means in detail, though "en" and "en_US.UTF-8" are not to its liking. Fix it by running a test function that's known to throw in such a case, and resetting LANG and LC_ALL to C if an exception is thrown. In simplewallet, the locale is queried before that so the correct translations will still be used. --- src/daemon/main.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/daemon/main.cpp') diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 547f4bd9e..a8369f98d 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -54,6 +54,8 @@ int main(int argc, char const * argv[]) _note_c("dbg/main", "Begin of main()"); // TODO parse the debug options like set log level right here at start + tools::sanitize_locale(); + epee::string_tools::set_module_name_and_folder(argv[0]); // Build argument description -- cgit v1.2.3