diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-23T17·11+0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-07-23T17·11+0200 |
commit | fdee1ced43fb495d612a29e955141cdf6b9a95ba (patch) | |
tree | 35dbc22fcfb65bb7d92a9c07bed5e138e21f1ca9 /src/libutil | |
parent | 5989966ed3bd58cd362aed8cba6cd5c90b380a32 (diff) |
startProcess: Make writing error messages from the child more robust
Diffstat (limited to 'src/libutil')
-rw-r--r-- | src/libutil/util.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libutil/util.cc b/src/libutil/util.cc index 6df93f12a0c6..32244b2185b6 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); } |