diff options
Diffstat (limited to 'libbuild2/utility.cxx')
-rw-r--r-- | libbuild2/utility.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx index 5659771..3ce0026 100644 --- a/libbuild2/utility.cxx +++ b/libbuild2/utility.cxx @@ -607,6 +607,21 @@ namespace build2 run_finish_impl (dbuf, args, pr, true /* fail */, finish_verbosity); } + cstrings + process_args (const char* program, const strings& args) + { + cstrings r; + r.reserve (args.size () + 2); + + r.push_back (program); + + for (const string& a: args) + r.push_back (a.c_str ()); + + r.push_back (nullptr); + return r; + } + fdpipe open_pipe () { |