wrowe 2003/03/18 20:21:58
Modified: include/arch/unix apr_arch_inherit.h
Log:
We register no cleanups for files with APR_FILE_NOCLEANUP - reflect that
by returning APR_EINVAL if the user attempts to toggle the inherit state.
Revision Changes Path
1.2 +4 -0 apr/include/arch/unix/apr_arch_inherit.h
Index: apr_arch_inherit.h
===================================================================
RCS file: /home/cvs/apr/include/arch/unix/apr_arch_inherit.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- apr_arch_inherit.h 6 Jan 2003 23:44:26 -0000 1.1
+++ apr_arch_inherit.h 19 Mar 2003 04:21:58 -0000 1.2
@@ -62,6 +62,8 @@
#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup) \
apr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name) \
{ \
+ if (the##name->flag & APR_FILE_NOCLEANUP) \
+ return APR_EINVAL; \
if (!(the##name->flag & APR_INHERIT)) { \
the##name->flag |= APR_INHERIT; \
apr_pool_child_cleanup_set(the##name->pool, \
@@ -79,6 +81,8 @@
#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup) \
apr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name) \
{ \
+ if (the##name->flag & APR_FILE_NOCLEANUP) \
+ return APR_EINVAL; \
if (the##name->flag & APR_INHERIT) { \
the##name->flag &= ~APR_INHERIT; \
apr_pool_child_cleanup_set(the##name->pool, \