startProcess: Make writing error messages from the child more robust
This commit is contained in:
parent
5989966ed3
commit
fdee1ced43
|
@ -854,8 +854,10 @@ pid_t startProcess(std::function<void()> fun, const string & errorPrefix)
|
|||
restoreAffinity();
|
||||
fun();
|
||||
} catch (std::exception & e) {
|
||||
writeToStderr(errorPrefix + string(e.what()) + "\n");
|
||||
}
|
||||
try {
|
||||
std::cerr << errorPrefix << e.what() << "\n";
|
||||
} catch (...) { }
|
||||
} catch (...) { }
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue