Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
apr_arch_inherit.h File Reference
#include "apr_inherit.h"
Include dependency graph for apr_arch_inherit.h:

Go to the source code of this file.

Macros

#define APR_INHERIT   (1 << 24) /* Must not conflict with other bits */
 
#define APR_IMPLEMENT_INHERIT_SET(name, flag, pool, cleanup)
 
#define APR_IMPLEMENT_INHERIT_UNSET(name, flag, pool, cleanup)
 

Macro Definition Documentation

#define APR_IMPLEMENT_INHERIT_SET (   name,
  flag,
  pool,
  cleanup 
)
Value:
apr_status_t apr_##name##_inherit_set(apr_##name##_t *the##name) \
{ \
if (the##name->flag & APR_FOPEN_NOCLEANUP) \
return APR_EINVAL; \
if (!(the##name->flag & APR_INHERIT)) { \
int flags = fcntl(the##name->name##des, F_GETFD); \
if (flags == -1) \
return errno; \
flags &= ~(FD_CLOEXEC); \
if (fcntl(the##name->name##des, F_SETFD, flags) == -1) \
return errno; \
the##name->flag |= APR_INHERIT; \
(void *)the##name, \
cleanup, apr_pool_cleanup_null); \
} \
return APR_SUCCESS; \
}
void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data, apr_status_t(*plain_cleanup)(void *), apr_status_t(*child_cleanup)(void *)) __attribute__((nonnull(3
#define APR_FOPEN_NOCLEANUP
Definition: apr_file_io.h:83
apr_status_t apr_pool_cleanup_null(void *data)
#define APR_EINVAL
Definition: apr_errno.h:717
int
Definition: mod_proxy.h:617
#define APR_INHERIT
Definition: apr_arch_inherit.h:22
APR_DECLARE_DATA int errno
Definition: apr_private.h:130
const char * name
Definition: mod_dav.h:730
int apr_status_t
Definition: apr_errno.h:44
#define APR_SUCCESS
Definition: apr_errno.h:225
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1350
#define APR_IMPLEMENT_INHERIT_UNSET (   name,
  flag,
  pool,
  cleanup 
)
Value:
apr_status_t apr_##name##_inherit_unset(apr_##name##_t *the##name) \
{ \
if (the##name->flag & APR_FOPEN_NOCLEANUP) \
return APR_EINVAL; \
if (the##name->flag & APR_INHERIT) { \
if ((flags = fcntl(the##name->name##des, F_GETFD)) == -1) \
return errno; \
flags |= FD_CLOEXEC; \
if (fcntl(the##name->name##des, F_SETFD, flags) == -1) \
return errno; \
the##name->flag &= ~APR_INHERIT; \
(void *)the##name, \
cleanup, cleanup); \
} \
return APR_SUCCESS; \
}
void apr_pool_child_cleanup_set(apr_pool_t *p, const void *data, apr_status_t(*plain_cleanup)(void *), apr_status_t(*child_cleanup)(void *)) __attribute__((nonnull(3
#define APR_FOPEN_NOCLEANUP
Definition: apr_file_io.h:83
#define APR_EINVAL
Definition: apr_errno.h:717
int
Definition: mod_proxy.h:617
#define APR_INHERIT
Definition: apr_arch_inherit.h:22
APR_DECLARE_DATA int errno
Definition: apr_private.h:130
const char * name
Definition: mod_dav.h:730
int apr_status_t
Definition: apr_errno.h:44
#define APR_SUCCESS
Definition: apr_errno.h:225
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1350
#define APR_INHERIT   (1 << 24) /* Must not conflict with other bits */