guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

73/376: startProcess: Make writing error messages from the child more ro


From: Ludovic Courtès
Subject: 73/376: startProcess: Make writing error messages from the child more robust
Date: Wed, 28 Jan 2015 22:04:08 +0000

civodul pushed a commit to tag 1.8
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);
     }
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]