summaryrefslogtreecommitdiff
path: root/memory/unix/apr_pools.c
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2009-12-18 22:21:11 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2009-12-18 22:21:11 +0000
commit907eda236672d08cc6f0f9584d1815df762db0e1 (patch)
tree843bf660ec2d236607a30db0cdd8e21acd5e8fb5 /memory/unix/apr_pools.c
parent29d503d884726cf916bab7db742431627bc385e7 (diff)
downloadlibapr-907eda236672d08cc6f0f9584d1815df762db0e1.tar.gz
Cleanups for various gcc warnings, conditional assignment and type errors
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@892387 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'memory/unix/apr_pools.c')
-rw-r--r--memory/unix/apr_pools.c31
1 files changed, 20 insertions, 11 deletions
diff --git a/memory/unix/apr_pools.c b/memory/unix/apr_pools.c
index 1002555ac..379862ec6 100644
--- a/memory/unix/apr_pools.c
+++ b/memory/unix/apr_pools.c
@@ -533,7 +533,6 @@ static apr_file_t *file_stderr = NULL;
*/
static void run_cleanups(cleanup_t **c);
-static void run_child_cleanups(cleanup_t **c);
static void free_proc_chain(struct process_chain *procs);
#if APR_POOL_DEBUG
@@ -2323,6 +2322,8 @@ static void run_cleanups(cleanup_t **cref)
}
}
+#if !defined(WIN32) && !defined(OS2)
+
static void run_child_cleanups(cleanup_t **cref)
{
cleanup_t *c = *cref;
@@ -2344,20 +2345,28 @@ static void cleanup_pool_for_exec(apr_pool_t *p)
APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
{
-#if !defined(WIN32) && !defined(OS2)
+ cleanup_pool_for_exec(global_pool);
+}
+
+#else /* !defined(WIN32) && !defined(OS2) */
+
+APR_DECLARE(void) apr_pool_cleanup_for_exec(void)
+{
/*
- * Don't need to do anything on NT or OS/2, because I
- * am actually going to spawn the new process - not
- * exec it. All handles that are not inheritable, will
- * be automajically closed. The only problem is with
- * file handles that are open, but there isn't much
- * I can do about that (except if the child decides
- * to go out and close them
+ * Don't need to do anything on NT or OS/2, because
+ * these platforms will spawn the new process - not
+ * fork for exec. All handles that are not inheritable,
+ * will be automajically closed. The only problem is
+ * with file handles that are open, but there isn't
+ * much that can be done about that (except if the
+ * child decides to go out and close them, or the
+ * developer quits opening them shared)
*/
- cleanup_pool_for_exec(global_pool);
-#endif /* !defined(WIN32) && !defined(OS2) */
+ return;
}
+#endif /* !defined(WIN32) && !defined(OS2) */
+
APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data)
{
/* do nothing cleanup routine */