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