From 26dfa9231a5659efb2125b66cb3b22d57edb99ba Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 1 Oct 2013 11:18:41 -0700 Subject: [PATCH] Clean up Sustain. --- src/ripple_basics/utility/Sustain.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ripple_basics/utility/Sustain.cpp b/src/ripple_basics/utility/Sustain.cpp index 3b76981bd..cd39caea7 100644 --- a/src/ripple_basics/utility/Sustain.cpp +++ b/src/ripple_basics/utility/Sustain.cpp @@ -77,16 +77,17 @@ std::string DoSustain (std::string logFile) setCallingThreadName (boost::str (boost::format ("#%d") % childCount).c_str ()); + sleep (9); do { int i; - sleep (10); - waitpid (-1, &i, 0); + sleep (1); + waitpid (pChild, &i, 0); } while (kill (pChild, 0) == 0); rename ("core", boost::str (boost::format ("core.%d") % static_cast (pChild)).c_str ()); - if (!logFile.empty()) + if (!logFile.empty()) // FIXME: logFile hasn't been set yet rename (logFile.c_str(), boost::str (boost::format ("%s.%d") % logFile % static_cast (pChild)).c_str ()); }