summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2007-09-28 21:04:47 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2007-09-28 21:04:47 +0000
commitf7d2c59a68901c3b3a617cce521d17ee95bb07d8 (patch)
treee87bcb5dbf3aff745722759fdc71d3281d340844 /include
parent52cfb7d8946bb82cd2638e58a409834aee080f6f (diff)
downloadapr-f7d2c59a68901c3b3a617cce521d17ee95bb07d8.tar.gz
Introduce APR_NO_FILE as an option for any of the three stdio streams
to cause the specified streams to be closed to the child process, when the caller has chosen that flag via apr_procattr_io_set(). ALSO; solve a serious flaw where we attempted to dup2 to a non existant file if the user had not already called apr_procattr_io_set()! The Unix implementation. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@580486 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/apr_thread_proc.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h
index 5cdb59d42..f6f3c76da 100644
--- a/include/apr_thread_proc.h
+++ b/include/apr_thread_proc.h
@@ -88,11 +88,7 @@ typedef enum {
#define APR_CHILD_BLOCK 4
/** @see apr_procattr_io_set
- * @note introduced strictly for Win32 to apr revision 1.2.12 (to restore
- * the non-portable default behavior of 1.2.9 and prior versions on Win32).
- * This becomes portable to all platforms effective revision 1.3.0, ensuring
- * the standard files specified in the call to apr_procattr_io_set are not
- * open in the created process (on Win32 as INVALID_HANDLE_VALUEs).
+ * @note Win32 only effective with version 1.2.12, portably introduced in 1.3.0
*/
#define APR_NO_FILE 8
@@ -401,6 +397,11 @@ APR_DECLARE(apr_status_t) apr_procattr_create(apr_procattr_t **new_attr,
* @param in Should stdin be a pipe back to the parent?
* @param out Should stdout be a pipe back to the parent?
* @param err Should stderr be a pipe back to the parent?
+ * @note If APR_NO_PIPE, there will be no special channel, the child
+ * inherit's the parent's stdio stream. If APR_NO_FILE is specified,
+ * that stdio stream is closed in the child (and will be INVALID_HANDLE_VALUE
+ * if inspected on Win32); warning this can have the ugly side effect
+ * that the next file opened may fall into the stdio stream role on Unix.
*/
APR_DECLARE(apr_status_t) apr_procattr_io_set(apr_procattr_t *attr,
apr_int32_t in, apr_int32_t out,