From ae5cab7489fe014dd3aa818cf2655d7a4714af83 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 16 Dec 2017 17:42:12 +0200 Subject: Improve process execution diagnostics by reusing run_*() API --- build2/bin/guess.cxx | 18 +++++++++--------- build2/bin/init.cxx | 3 ++- 2 files changed, 11 insertions(+), 10 deletions(-) (limited to 'build2/bin') diff --git a/build2/bin/guess.cxx b/build2/bin/guess.cxx index 780ccf8..795477e 100644 --- a/build2/bin/guess.cxx +++ b/build2/bin/guess.cxx @@ -78,7 +78,7 @@ namespace build2 // (yes, it goes to stdout) but that seems harmless. // sha256 cs; - arr = run (arp, "--version", f, false, false, &cs); + arr = run (3, arp, "--version", f, false, false, &cs); if (!arr.empty ()) arr.checksum = cs.string (); @@ -101,7 +101,7 @@ namespace build2 // Redirect STDERR to STDOUT and ignore exit status. // sha256 cs; - arr = run (arp, f, false, true, &cs); + arr = run (3, arp, f, false, true, &cs); if (!arr.empty ()) { @@ -142,7 +142,7 @@ namespace build2 }; sha256 cs; - rlr = run (rlp, "--version", f, false, false, &cs); + rlr = run (3, rlp, "--version", f, false, false, &cs); if (!rlr.empty ()) rlr.checksum = cs.string (); @@ -162,7 +162,7 @@ namespace build2 // Redirect STDERR to STDOUT and ignore exit status. // sha256 cs; - rlr = run (rlp, f, false, true, &cs); + rlr = run (3, rlp, f, false, true, &cs); if (!rlr.empty ()) { @@ -224,7 +224,7 @@ namespace build2 // but that seems harmless. // sha256 cs; - r = run (pp, "--version", f, false, true, &cs); + r = run (3, pp, "--version", f, false, true, &cs); if (!r.empty ()) r.checksum = cs.string (); @@ -255,7 +255,7 @@ namespace build2 }; sha256 cs; - r = run (pp, "-v", f, false, false, &cs); + r = run (3, pp, "-v", f, false, false, &cs); if (!r.empty ()) r.checksum = cs.string (); @@ -282,7 +282,7 @@ namespace build2 // option. // sha256 cs; - r = run (pp, "-version", f, false, false, &cs); + r = run (3, pp, "-version", f, false, false, &cs); if (!r.empty ()) r.checksum = cs.string (); @@ -322,7 +322,7 @@ namespace build2 // option. // sha256 cs; - r = run (pp, "--version", f, false, false, &cs); + r = run (3, pp, "--version", f, false, false, &cs); if (!r.empty ()) r.checksum = cs.string (); @@ -342,7 +342,7 @@ namespace build2 }; sha256 cs; - r = run (pp, "/?", f, false, false, &cs); + r = run (3, pp, "/?", f, false, false, &cs); if (!r.empty ()) r.checksum = cs.string (); diff --git a/build2/bin/init.cxx b/build2/bin/init.cxx index ef4b3df..d9f3c0e 100644 --- a/build2/bin/init.cxx +++ b/build2/bin/init.cxx @@ -250,7 +250,8 @@ namespace build2 // if (!hint && ops.config_sub_specified ()) { - s = run (ops.config_sub (), + s = run (3, + ops.config_sub (), s.c_str (), [] (string& l) {return move (l);}); l5 ([&]{trace << "config.sub target: '" << s << "'";}); -- cgit v1.1