From 9bd06458e869ab0b41db2d3d7b190d6183ff8547 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 29 Jun 2016 14:34:40 +0300 Subject: Fix cli test to read cli output till the end --- build2/cli/module.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'build2/cli') diff --git a/build2/cli/module.cxx b/build2/cli/module.cxx index 01d606f..6a6ab38 100644 --- a/build2/cli/module.cxx +++ b/build2/cli/module.cxx @@ -116,6 +116,12 @@ namespace build2 if (p != string::npos) ver = string (ver, p + 1); + // Skip until the end as cli doesn't handle writing to the closed + // pipe very well (SIGPIPE). + // + if (is.good ()) + is.ignore (numeric_limits::max ()); + is.close (); // Don't block the other end. if (!pr.wait ()) -- cgit v1.1