From 29a9c91a6b358fb87dfc26194705313d29aef81a Mon Sep 17 00:00:00 2001 From: colm Date: Sat, 15 Oct 2005 08:22:41 +0000 Subject: Add apr_file_open_flags_std[err|out|in]() functions, to allow the opening of the standard file descriptors with specific flags set. As a consequence we now also set APR_WRITE and APR_READ as appropriate when using the plain old apr_file_open_std[err|out|in]() functions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@321314 13f79535-47bb-0310-9956-ffa450edef68 --- include/apr_file_io.h | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'include/apr_file_io.h') diff --git a/include/apr_file_io.h b/include/apr_file_io.h index 42078a68e..4c4519851 100644 --- a/include/apr_file_io.h +++ b/include/apr_file_io.h @@ -324,6 +324,51 @@ APR_DECLARE(apr_status_t) apr_file_open_stdout(apr_file_t **thefile, APR_DECLARE(apr_status_t) apr_file_open_stdin(apr_file_t **thefile, apr_pool_t *pool); +/** + * open standard error as an apr file pointer, with flags. + * @param thefile The apr file to use as stderr. + * @param flags The flags to open the file with. Only the APR_EXCL, + * APR_BUFFERED, APR_XTHREAD, APR_SHARELOCK, + * APR_SENDFILE_ENABLED and APR_LARGEFILE flags should + * be used. The APR_WRITE flag will be set unconditionally. + * @param pool The pool to allocate the file out of. + * + * @remark See remarks for apr_file_open_stderr. + */ +APR_DECLARE(apr_status_t) apr_file_open_flags_stderr(apr_file_t **thefile, + apr_int32_t flags, + apr_pool_t *pool); + +/** + * open standard output as an apr file pointer, with flags. + * @param thefile The apr file to use as stdout. + * @param flags The flags to open the file with. Only the APR_EXCL, + * APR_BUFFERED, APR_XTHREAD, APR_SHARELOCK, + * APR_SENDFILE_ENABLED and APR_LARGEFILE flags should + * be used. The APR_WRITE flag will be set unconditionally. + * @param pool The pool to allocate the file out of. + * + * @remark See remarks for apr_file_open_stderr. + */ +APR_DECLARE(apr_status_t) apr_file_open_flags_stdout(apr_file_t **thefile, + apr_int32_t flags, + apr_pool_t *pool); + +/** + * open standard input as an apr file pointer, with flags. + * @param thefile The apr file to use as stdin. + * @param flags The flags to open the file with. Only the APR_EXCL, + * APR_BUFFERED, APR_XTHREAD, APR_SHARELOCK, + * APR_SENDFILE_ENABLED and APR_LARGEFILE flags should + * be used. The APR_READ flag will be set unconditionally. + * @param pool The pool to allocate the file out of. + * + * @remark See remarks for apr_file_open_stderr. + */ +APR_DECLARE(apr_status_t) apr_file_open_flags_stdin(apr_file_t **thefile, + apr_int32_t flags, + apr_pool_t *pool); + /** * Read data from the specified file. * @param thefile The file descriptor to read from. -- cgit v1.2.1