From f7f22db6030464f63eb942da04b3d5e10351f770 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 2 Nov 2022 09:56:31 +0200 Subject: More work on child process diagnostics buffering --- libbuild2/install/rule.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'libbuild2/install/rule.cxx') diff --git a/libbuild2/install/rule.cxx b/libbuild2/install/rule.cxx index 9f01578..aa13169 100644 --- a/libbuild2/install/rule.cxx +++ b/libbuild2/install/rule.cxx @@ -848,7 +848,7 @@ namespace build2 text << "install " << chd; } - run (pp, args); + run (ctx, pp, args); } void file_rule:: @@ -903,7 +903,7 @@ namespace build2 } if (!ctx.dry_run) - run (pp, args); + run (ctx, pp, args); } void file_rule:: @@ -946,7 +946,7 @@ namespace build2 } if (!ctx.dry_run) - run (pp, args); + run (ctx, pp, args); #else // The -f part. // @@ -1179,8 +1179,13 @@ namespace build2 text << "uninstall " << reld; } - process pr (run_start (pp, args)); - r = run_finish_code (args, pr); + diag_buffer dbuf (rs.ctx); + process pr (run_start (pp, args, + 0 /* stdin */, + 1 /* stdout */, + dbuf.open (args[0]) /* stderr */)); + dbuf.read (); + r = run_finish_code (dbuf, args, pr); } if (!r) @@ -1279,7 +1284,7 @@ namespace build2 print_process (args); if (!ctx.dry_run) - run (pp, args); + run (ctx, pp, args); } return true; -- cgit v1.1