Tolerate failure in setting current locale

This commit is contained in:
Maxime Coste 2016-05-12 00:00:03 +01:00
parent 656b8c1c95
commit 4c8089009d

View File

@ -706,7 +706,8 @@ int run_pipe(StringView session)
int main(int argc, char* argv[])
{
std::locale::global(std::locale(""));
try { std::locale::global(std::locale("")); }
catch (std::runtime_error&) { setlocale(LC_ALL, ""); }
set_signal_handler(SIGSEGV, signal_handler);
set_signal_handler(SIGFPE, signal_handler);