diff options
Diffstat (limited to 'bdep/utility.cxx')
-rw-r--r-- | bdep/utility.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/bdep/utility.cxx b/bdep/utility.cxx index b670587..8caedc6 100644 --- a/bdep/utility.cxx +++ b/bdep/utility.cxx @@ -80,6 +80,8 @@ namespace bdep } } + bool stderr_term; + bool exists (const path& f, bool ignore_error) { @@ -174,6 +176,32 @@ namespace bdep } } + 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 char* name_bpkg (const common_options& co) { |