17#include "apr_arch_threadproc.h"
38 (*new)->uid = (*new)->gid = -1;
225 if ((pid =
fork()) < 0) {
243#if APR_HAVE_STRUCT_RLIMIT && APR_HAVE_SETRLIMIT
265#if defined(RLIMIT_AS)
271#elif defined(RLIMIT_DATA)
277#elif defined(RLIMIT_VMEM)
346 const char *
const *
args,
347 const char *
const *
env,
394 else if (
new->pid == 0) {
469 r = (*
c->perms_set_fn)((
void *)
c->data,
c->perms,
680#if APR_HAVE_STRUCT_RLIMIT
688 attr->limit_cpu = limit;
695#if defined(RLIMIT_DATA) || defined(RLIMIT_VMEM) || defined(RLIMIT_AS)
696 attr->limit_mem = limit;
704 attr->limit_nproc = limit;
712 attr->limit_nofile = limit;
const char apr_size_t len
APR Portability Routines.
static apr_file_t no_file
#define APR_CHILD_NOTDONE
apr_fileperms_t apr_uid_t apr_gid_t gid
const void apr_status_t(*) apr_status_t(* APR_DECLARE)(void) apr_pool_pre_cleanup_register(apr_pool_t *p
const char int apr_pool_t * pool
apr_int32_t apr_fileperms_t
const char apr_fileperms_t perms
apr_vformatter_buff_t * c
char const *const char const *const ** env
apr_status_t() apr_perms_setfn_t(void *object, apr_fileperms_t perms, apr_uid_t uid, apr_gid_t gid)
#define apr_pcalloc(p, size)
const char const char * password
apr_int32_t apr_int32_t apr_int32_t err
apr_file_t apr_file_t * parent_out
apr_perms_setfn_t * perms_set_fn
const char const char *const const char *const apr_procattr_t * attr
void() apr_child_errfn_t(apr_pool_t *proc, apr_status_t err, const char *description)
apr_child_errfn_t * errfn
int apr_exit_why_e * exitwhy
apr_file_t apr_file_t * parent_in
const char const char *const * args
#define APR_PROC_DETACH_DAEMONIZE
int apr_exit_why_e apr_wait_how_e waithow
apr_file_t apr_file_t * parent_err
static apr_status_t limit_proc(apr_procattr_t *attr)
apr_status_t apr_proc_detach(int daemonize)
apr_child_errfn_t * errfn
apr_procattr_pscb_t * perms_set_callbacks
apr_status_t apr_unix_file_cleanup(void *thefile)
int waitpid(pid_t pid, int *statusp, int options)