aboutsummaryrefslogtreecommitdiffstats
path: root/utils/cec-follower/cec-processing.cpp
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2017-02-01 11:15:00 +0100
committerHans Verkuil <hans.verkuil@cisco.com>2017-02-01 11:15:00 +0100
commit99306f20cc7e76cf2161e3059de4da245aed2130 (patch)
tree3c506238d483dc7671f0c5371d56325e16b1ec1b /utils/cec-follower/cec-processing.cpp
parent9df320dd3d1a498fcd6cdeef7d783da609b526e0 (diff)
cec-ctl/cec-follower: call fflush after processing a message
If you run 'cec-ctl -M' and/or cec-follower as separate background processes, and then you kill those processes, any buffered stdout output is lost. Add fflush(stdout) after a message has been processed to ensure that the buffer is flushed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Diffstat (limited to 'utils/cec-follower/cec-processing.cpp')
-rw-r--r--utils/cec-follower/cec-processing.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index b96b3e34..b8f9b046 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -1034,6 +1034,7 @@ void testProcessing(struct node *node)
int res;
struct timeval timeval = {};
+ fflush(stdout);
timeval.tv_sec = 1;
FD_ZERO(&rd_fds);
FD_ZERO(&ex_fds);

Privacy Policy