mirror of
https://github.com/NixOS/nix.git
synced 2024-11-23 07:12:27 +00:00
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 New Issue
Block a user