Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Multi-Processing Module library
Collaboration diagram for Multi-Processing Module library:

Modules

 MPM query
 

Macros

#define AP_MONCONTROL(x)
 

Typedefs

typedef voidap_mpm_callback_fn_t )(void *baton)
 
typedef enum mpm_child_status mpm_child_status
 

Enumerations

enum  mpm_child_status { MPM_CHILD_STARTED, MPM_CHILD_EXITED, MPM_CHILD_LOST_SLOT }
 

Functions

apr_status_t ap_os_create_privileged_process (const request_rec *r, apr_proc_t *newproc, const char *progname, const char *const *args, const char *const *env, apr_procattr_t *attr, apr_pool_t *p)
 
apr_status_t ap_mpm_resume_suspended (conn_rec *c)
 
apr_status_t ap_mpm_register_timed_callback (apr_time_t t, ap_mpm_callback_fn_t *cbfn, void *baton)
 
apr_status_t ap_mpm_register_poll_callback (apr_array_header_t *pfds, ap_mpm_callback_fn_t *cbfn, void *baton)
 
apr_status_t ap_mpm_register_poll_callback_timeout (apr_array_header_t *pfds, ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout)
 
apr_status_t ap_mpm_unregister_poll_callback (apr_array_header_t *pfds)
 

Detailed Description

Macro Definition Documentation

#define AP_MONCONTROL (   x)

Typedef Documentation

typedef void( ap_mpm_callback_fn_t)(void *baton)

Enumeration Type Documentation

Enumerator
MPM_CHILD_STARTED 
MPM_CHILD_EXITED 
MPM_CHILD_LOST_SLOT 

Function Documentation

apr_status_t ap_mpm_register_poll_callback ( apr_array_header_t pfds,
ap_mpm_callback_fn_t cbfn,
void baton 
)

Register a callback on the readability or writability on a group of sockets/pipes.

Parameters
pfdsArray of apr_pollfd_t
cbfnThe callback function
batonuserdata for the callback function
Returns
APR_SUCCESS if all sockets/pipes could be added to a pollset, APR_ENOTIMPL if no asynch support, or an apr_pollset_add error.
Remarks
When activity is found on any 1 socket/pipe in the list, all are removed from the pollset and only 1 callback is issued.
apr_status_t ap_mpm_register_poll_callback_timeout ( apr_array_header_t pfds,
ap_mpm_callback_fn_t cbfn,
ap_mpm_callback_fn_t tofn,
void baton,
apr_time_t  timeout 
)

Register a callback on the readability or writability on a group of sockets/pipes, with a timeout.

Parameters
pfdsArray of apr_pollfd_t
cbfnThe callback function
tofnThe callback function if the timeout expires
batonuserdata for the callback function
timeouttimeout for I/O in microseconds, unlimited if <= 0
Returns
APR_SUCCESS if all sockets/pipes could be added to a pollset, APR_ENOTIMPL if no asynch support, or an apr_pollset_add error.
Remarks
When activity is found on any 1 socket/pipe in the list, all are removed from the pollset and only 1 callback is issued.
For each call, only one of tofn or cbfn will be called, never both.
apr_status_t ap_mpm_register_timed_callback ( apr_time_t  t,
ap_mpm_callback_fn_t cbfn,
void baton 
)
apr_status_t ap_mpm_resume_suspended ( conn_rec c)
apr_status_t ap_mpm_unregister_poll_callback ( apr_array_header_t pfds)

Unregister a previously registered callback.

Parameters
pfdsArray of apr_pollfd_t
Returns
APR_SUCCESS if all sockets/pipes could be removed from the pollset, APR_ENOTIMPL if no asynch support, or an apr_pollset_remove error.
Remarks
This function triggers the cleanup registered on the pool p during callback registration.
apr_status_t ap_os_create_privileged_process ( const request_rec r,
apr_proc_t newproc,
const char *  progname,
const char *const *  args,
const char *const *  env,
apr_procattr_t attr,
apr_pool_t p 
)

Spawn a process with privileges that another module has requested

Parameters
rThe request_rec of the current request
newprocThe resulting process handle.
prognameThe program to run
argsthe arguments to pass to the new program. The first one should be the program name.
envThe new environment apr_table_t for the new process. This should be a list of NULL-terminated strings.
attrthe procattr we should use to determine how to create the new process
pThe pool to use.