[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
73/118: startProcess: Make writing error messages from the child more ro
From: |
Ludovic Courtès |
Subject: |
73/118: startProcess: Make writing error messages from the child more robust |
Date: |
Tue, 19 May 2015 14:45:46 +0000 |
civodul pushed a commit to branch nix
in repository guix.
commit fdee1ced43fb495d612a29e955141cdf6b9a95ba
Author: Eelco Dolstra <address@hidden>
Date: Wed Jul 23 19:11:26 2014 +0200
startProcess: Make writing error messages from the child more robust
---
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 6df93f1..32244b2 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);
}
- 68/118: Ugly hack to fix building on old Darwin, (continued)
- 68/118: Ugly hack to fix building on old Darwin, Ludovic Courtès, 2015/05/19
- 64/118: nix-daemon: Fix compat with older clients, Ludovic Courtès, 2015/05/19
- 61/118: Handle case collisions on case-insensitive systems, Ludovic Courtès, 2015/05/19
- 60/118: Make dev-shell script work on Darwin, Ludovic Courtès, 2015/05/19
- 71/118: Revert old useBuildHook behaviour, Ludovic Courtès, 2015/05/19
- 63/118: Get rid of a compiler warning, Ludovic Courtès, 2015/05/19
- 67/118: nix-daemon: Add trusted-users and allowed-users options, Ludovic Courtès, 2015/05/19
- 70/118: Better fix for strcasecmp on Darwin, Ludovic Courtès, 2015/05/19
- 75/118: Merge commit 'fdee1ced43fb495d612a29e955141cdf6b9a95ba' into nix, Ludovic Courtès, 2015/05/19
- 74/118: Merge commit '8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74' into nix, Ludovic Courtès, 2015/05/19
- 73/118: startProcess: Make writing error messages from the child more robust,
Ludovic Courtès <=
- 69/118: Bump, Ludovic Courtès, 2015/05/19
- 86/118: Add option ‘build-extra-chroot-dirs’, Ludovic Courtès, 2015/05/19
- 76/118: nix-daemon: Simplify stderr handling, Ludovic Courtès, 2015/05/19
- 77/118: nix-daemon: Less verbosity, Ludovic Courtès, 2015/05/19
- 90/118: Remove unnecessary call to addTempRoot(), Ludovic Courtès, 2015/05/19
- 88/118: Move some options out of globals, Ludovic Courtès, 2015/05/19
- 83/118: Call commonChildInit() before doing chroot init, Ludovic Courtès, 2015/05/19
- 84/118: Remove ugly hack for detecting build environment setup errors, Ludovic Courtès, 2015/05/19
- 85/118: Get rid of "killing <pid>" message for unused build hooks, Ludovic Courtès, 2015/05/19
- 93/118: Reduce verbosity, Ludovic Courtès, 2015/05/19