aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-10 22:09:59 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-12 16:49:44 +0300
commitd712f69f5f769c5eaada3c1f76419abfb7b6f7ed (patch)
treea7b36e3e87ce5ef71610f864645dbd7bc339a997 /libbuild2/utility.cxx
parent5524dcb9a9b10a65e450458eb76c84451a283ccc (diff)
Add builtins support for $process.run*() functions
Diffstat (limited to 'libbuild2/utility.cxx')
-rw-r--r--libbuild2/utility.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx
index 7fa0ef1..faffd66 100644
--- a/libbuild2/utility.cxx
+++ b/libbuild2/utility.cxx
@@ -313,6 +313,31 @@ namespace build2
fail << "io error reading " << args[0] << " output: " << e << endf;
}
+ fdpipe
+ open_pipe ()
+ {
+ try
+ {
+ return fdopen_pipe ();
+ }
+ catch (const io_error& e)
+ {
+ fail << "unable to open pipe: " << e << endf;
+ }
+ }
+
+ auto_fd
+ open_dev_null ()
+ {
+ try
+ {
+ return fdnull ();
+ }
+ catch (const io_error& e)
+ {
+ fail << "unable to open null device: " << e << endf;
+ }
+ }
const string empty_string;
const path empty_path;