diff options
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r-- | bpkg/utility.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx index 26716e8..252bdef 100644 --- a/bpkg/utility.cxx +++ b/bpkg/utility.cxx @@ -234,6 +234,32 @@ namespace bpkg } } + 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; + } + } + dir_path exec_dir; void |