aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/util.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc
index 6df93f12a..32244b218 100644
--- a/src/libutil/util.cc
+++ b/src/libutil/util.cc
@@ -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);
}