From 6f020aaefacd43706f80829ee77ba2ee26dcbf4b Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 28 Jun 2022 20:14:06 +0300 Subject: Fix worker not to fail on reading child process output without terminating newline character --- bbot/worker/worker.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'bbot') diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index f2a3994..ce62ae9 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -17,7 +17,7 @@ #include #include #include -#include // to_utf8() +#include // to_utf8(), eof() #include #include #include @@ -463,12 +463,12 @@ run_cmd (step_id step, { // Skip on exception. // - ifdstream is (move (err_pipe.in), fdstream_mode::skip); + ifdstream is (move (err_pipe.in), + fdstream_mode::skip, + ifdstream::badbit); - for (string l; is.peek () != ifdstream::traits_type::eof (); ) + for (string l; !eof (getline (is, l)); ) { - getline (is, l); - // Match the log line with the warning-detecting regular // expressions until the first match. // -- cgit v1.1