aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2022-06-28 20:14:06 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2022-06-28 21:21:22 +0300
commit6f020aaefacd43706f80829ee77ba2ee26dcbf4b (patch)
tree5e7be8bed2902a3ec9f47055f7053180cf0c76b7
parentdd3c35fd102018c51d31e75345c4cf8ecab75848 (diff)
Fix worker not to fail on reading child process output without terminating newline character
-rw-r--r--bbot/worker/worker.cxx10
1 files changed, 5 insertions, 5 deletions
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 <libbutl/b.hxx>
#include <libbutl/pager.hxx>
#include <libbutl/prompt.hxx>
-#include <libbutl/utility.hxx> // to_utf8()
+#include <libbutl/utility.hxx> // to_utf8(), eof()
#include <libbutl/timestamp.hxx>
#include <libbutl/filesystem.hxx>
#include <libbutl/string-parser.hxx>
@@ -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.
//