diff options
Diffstat (limited to 'libbutl/fdstream.hxx')
-rw-r--r-- | libbutl/fdstream.hxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbutl/fdstream.hxx b/libbutl/fdstream.hxx index 752f8ab..6673fed 100644 --- a/libbutl/fdstream.hxx +++ b/libbutl/fdstream.hxx @@ -595,6 +595,16 @@ namespace butl LIBBUTL_SYMEXPORT fdstream_mode fdmode (int, fdstream_mode); + // Portable functions for obtaining file descriptors of standard streams. + // Note that you normally wouldn't want to close them using fddup() to + // convert them to auto_fd, for example: + // + // ifdstream is (fddup (stdin_fd ())); + // + LIBBUTL_SYMEXPORT int stdin_fd (); + LIBBUTL_SYMEXPORT int stdout_fd (); + LIBBUTL_SYMEXPORT int stderr_fd (); + // Convenience functions for setting the translation mode for standard // streams. // |