Apache2
Multi-Processing Module library
Collaboration diagram for Multi-Processing Module library:

Modules

 MPM query
 

Macros

#define AP_MONCONTROL(x)
 

Typedefs

typedef void() ap_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_pool_t *p, const apr_array_header_t *pfds, ap_mpm_callback_fn_t *cbfn, void *baton)
 
apr_status_t ap_mpm_register_poll_callback_timeout (apr_pool_t *p, const apr_array_header_t *pfds, ap_mpm_callback_fn_t *cbfn, ap_mpm_callback_fn_t *tofn, void *baton, apr_time_t timeout)
 

Detailed Description

Macro Definition Documentation

◆ AP_MONCONTROL

#define AP_MONCONTROL (   x)

Typedef Documentation

◆ ap_mpm_callback_fn_t

typedef void() ap_mpm_callback_fn_t(void *baton)

◆ mpm_child_status

Enumeration Type Documentation

◆ mpm_child_status

Enumerator
MPM_CHILD_STARTED 
MPM_CHILD_EXITED 
MPM_CHILD_LOST_SLOT 

Function Documentation

◆ ap_mpm_register_poll_callback()

apr_status_t ap_mpm_register_poll_callback ( apr_pool_t p,
const 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
pPool used by the MPM for its internal allocations
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.
The passed in pool can be cleared by cbfn and tofn when called back, it retains no MPM persistent data and won't be used until the next call to ap_mpm_register_poll_callback[_timeout].

◆ ap_mpm_register_poll_callback_timeout()

apr_status_t ap_mpm_register_poll_callback_timeout ( apr_pool_t p,
const 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
pPool used by the MPM for its internal allocations
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.
The passed in pool can be cleared by cbfn and tofn when called back, it retains no MPM persistent data and won't be used until the next call to ap_mpm_register_poll_callback[_timeout].

◆ ap_mpm_register_timed_callback()

apr_status_t ap_mpm_register_timed_callback ( apr_time_t  t,
ap_mpm_callback_fn_t cbfn,
void *  baton 
)

◆ ap_mpm_resume_suspended()

apr_status_t ap_mpm_resume_suspended ( conn_rec c)

◆ ap_os_create_privileged_process()

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.