aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2014-01-18 18:39:47 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2014-01-18 19:21:14 +0000
commit161467bc59a45fa43dadfc8045d09f5d9571e13d (patch)
treeb620442509be0695e203639a61e3e224b31ca446
parent4cd0ce09b56b2f530ae7512f75768ccf285b2d42 (diff)
downloadpaludis-161467bc59a45fa43dadfc8045d09f5d9571e13d.tar.gz
paludis-161467bc59a45fa43dadfc8045d09f5d9571e13d.tar.xz
Be a little less noisy
-rw-r--r--paludis/util/process.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/paludis/util/process.cc b/paludis/util/process.cc
index ef00b00..3b59d0b 100644
--- a/paludis/util/process.cc
+++ b/paludis/util/process.cc
@@ -36,6 +36,7 @@
#include <cstdlib>
#include <cstring>
#include <thread>
+#include <mutex>
#include <errno.h>
#include <unistd.h>
@@ -606,8 +607,13 @@ Process::run()
Log::get_instance()->message("util.system.gwinsz.ioctl_failed", ll_warning, lc_context)
<< "ioctl(TIOCGWINSZ) failed: " + std::string(std::strerror(errno));
else if (0 == ws.ws_col || 0 == ws.ws_row)
- Log::get_instance()->message("util.system.gwinsz.dodgy", ll_warning, lc_context)
- << "Got zero for terminal columns and/or lines (" << ws.ws_col << "x" << ws.ws_row << "), ignoring";
+ {
+ static std::once_flag once;
+ std::call_once(once, [&] () {
+ Log::get_instance()->message("util.system.gwinsz.dodgy", ll_warning, lc_context)
+ << "Got zero for terminal columns and/or lines (" << ws.ws_col << "x" << ws.ws_row << "), ignoring";
+ });
+ }
else
{
columns = ws.ws_col;