loolwsd/LOOLForKit.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-)
New commits: commit 20b98906bd405d6b90e55c091366edad7bf69066 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sat Oct 22 19:04:07 2016 -0400 loolwsd: avoid superflous noise where possible Change-Id: Idb9180d81e471da965152175aa3c327b83613ab1 Reviewed-on: https://gerrit.libreoffice.org/30206 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/loolwsd/LOOLForKit.cpp b/loolwsd/LOOLForKit.cpp index c23141b..9272933 100644 --- a/loolwsd/LOOLForKit.cpp +++ b/loolwsd/LOOLForKit.cpp @@ -215,10 +215,14 @@ static int createLibreOfficeKit(const std::string& childRoot, if (std::getenv("SLEEPKITFORDEBUGGER")) { - std::cerr << "Sleeping " << std::getenv("SLEEPKITFORDEBUGGER") - << " seconds to give you time to attach debugger to process " - << Process::id() << std::endl; - Thread::sleep(std::stoul(std::getenv("SLEEPKITFORDEBUGGER")) * 1000); + const auto delaySecs = std::stoul(std::getenv("SLEEPKITFORDEBUGGER")); + if (delaySecs > 0) + { + std::cerr << "Sleeping " << delaySecs + << " seconds to give you time to attach debugger to process " + << Process::id() << std::endl; + Thread::sleep(delaySecs * 1000); + } } lokit_main(childRoot, sysTemplate, loTemplate, loSubPath, NoCapsForKit, queryVersion, DisplayVersion); @@ -258,10 +262,14 @@ int main(int argc, char** argv) if (std::getenv("SLEEPFORDEBUGGER")) { - std::cerr << "Sleeping " << std::getenv("SLEEPFORDEBUGGER") - << " seconds to give you time to attach debugger to process " - << Process::id() << std::endl; - Thread::sleep(std::stoul(std::getenv("SLEEPFORDEBUGGER")) * 1000); + const auto delaySecs = std::stoul(std::getenv("SLEEPFORDEBUGGER")); + if (delaySecs > 0) + { + std::cerr << "Sleeping " << delaySecs + << " seconds to give you time to attach debugger to process " + << Process::id() << std::endl; + Thread::sleep(delaySecs * 1000); + } } // Initialization _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits