diff options
author | colm <colm@13f79535-47bb-0310-9956-ffa450edef68> | 2005-10-15 08:22:41 +0000 |
---|---|---|
committer | colm <colm@13f79535-47bb-0310-9956-ffa450edef68> | 2005-10-15 08:22:41 +0000 |
commit | 29a9c91a6b358fb87dfc26194705313d29aef81a (patch) | |
tree | c745d2f42b6e3986351dcdffdd485208803a0012 /include/apr_file_io.h | |
parent | 7996a0c00e316848468a7eddf2400cda7e44d834 (diff) | |
download | libapr-29a9c91a6b358fb87dfc26194705313d29aef81a.tar.gz |
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
Diffstat (limited to 'include/apr_file_io.h')
-rw-r--r-- | include/apr_file_io.h | 45 |
1 files changed, 45 insertions, 0 deletions
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 @@ -325,6 +325,51 @@ 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. * @param buf The buffer to store the data to. |