diff options
-rw-r--r-- | include/apr_thread_proc.h | 12 | ||||
-rw-r--r-- | include/arch/netware/apr_arch_threadproc.h | 1 | ||||
-rw-r--r-- | threadproc/beos/proc.c | 7 | ||||
-rw-r--r-- | threadproc/netware/proc.c | 12 | ||||
-rw-r--r-- | threadproc/os2/proc.c | 7 | ||||
-rw-r--r-- | threadproc/unix/proc.c | 7 | ||||
-rw-r--r-- | threadproc/win32/proc.c | 7 |
7 files changed, 47 insertions, 6 deletions
diff --git a/include/apr_thread_proc.h b/include/apr_thread_proc.h index c3c8289ed..fd3ba8b5a 100644 --- a/include/apr_thread_proc.h +++ b/include/apr_thread_proc.h @@ -42,9 +42,6 @@ extern "C" { */ typedef enum { -#ifdef NETWARE - APR_PROGRAM_ADDRSPACE, /**< invoke the program in its own address space */ -#endif APR_SHELLCMD, /**< use the shell to invoke the program */ APR_PROGRAM, /**< invoke the program directly, no copied env */ APR_PROGRAM_ENV, /**< invoke the program, replicating our environment */ @@ -517,6 +514,15 @@ APR_DECLARE(apr_status_t) apr_procattr_child_errfn_set(apr_procattr_t *attr, APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, apr_int32_t chk); +/** + * Determine if the child should start in its own address space or using the + * current one from its parent + * @param attr The procattr we care about. + * @param addrspace Should the child start in ouw address space? Default is no. + */ +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace); + #if APR_HAS_FORK /** * This is currently the only non-portable call in APR. This executes diff --git a/include/arch/netware/apr_arch_threadproc.h b/include/arch/netware/apr_arch_threadproc.h index 39b79aeb1..5f5ddcff6 100644 --- a/include/arch/netware/apr_arch_threadproc.h +++ b/include/arch/netware/apr_arch_threadproc.h @@ -60,6 +60,7 @@ struct apr_procattr_t { char *currdir; apr_int32_t cmdtype; apr_int32_t detached; + apr_int32_t addrspace; }; struct apr_thread_once_t { diff --git a/threadproc/beos/proc.c b/threadproc/beos/proc.c index ff6ac1e0d..d3eb4cd7d 100644 --- a/threadproc/beos/proc.c +++ b/threadproc/beos/proc.c @@ -178,6 +178,13 @@ APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace) +{ + /* won't ever be used on this platform, so don't save the flag */ + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname, const char * const *args, const char * const *env, diff --git a/threadproc/netware/proc.c b/threadproc/netware/proc.c index 2b3973576..52c1495b7 100644 --- a/threadproc/netware/proc.c +++ b/threadproc/netware/proc.c @@ -173,8 +173,7 @@ APR_DECLARE(apr_status_t) apr_procattr_dir_set(apr_procattr_t *attr, APR_DECLARE(apr_status_t) apr_procattr_cmdtype_set(apr_procattr_t *attr, apr_cmdtype_e cmd) { - if (cmd == APR_PROGRAM_ADDRSPACE) - attr->cmdtype = cmd; + /* won't ever be called on this platform, so don't save the function pointer */ return APR_SUCCESS; } @@ -266,6 +265,13 @@ APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace) +{ + attr->addrspace = addrspace; + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc, const char *progname, const char * const *args, @@ -287,7 +293,7 @@ APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc, /* attr->detached and PROC_DETACHED do not mean the same thing. attr->detached means * start the NLM in a separate address space. PROC_DETACHED means don't wait for the * NLM to unload by calling wait() or waitpid(), just clean up */ - addr_space = PROC_LOAD_SILENT | ((attr->cmdtype == APR_PROGRAM_ADDRSPACE) ? 0 : PROC_CURRENT_SPACE); + addr_space = PROC_LOAD_SILENT | (attr->addrspace ? 0 : PROC_CURRENT_SPACE); addr_space |= (attr->detached ? PROC_DETACHED : 0); if (attr->currdir) { diff --git a/threadproc/os2/proc.c b/threadproc/os2/proc.c index 8fa508fef..c0ff58407 100644 --- a/threadproc/os2/proc.c +++ b/threadproc/os2/proc.c @@ -255,6 +255,13 @@ APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace) +{ + /* won't ever be used on this platform, so don't save the flag */ + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *proc, const char *progname, diff --git a/threadproc/unix/proc.c b/threadproc/unix/proc.c index ab5018cf6..5c5536b22 100644 --- a/threadproc/unix/proc.c +++ b/threadproc/unix/proc.c @@ -273,6 +273,13 @@ APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace) +{ + /* won't ever be used on this platform, so don't save the flag */ + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname, const char * const *args, diff --git a/threadproc/win32/proc.c b/threadproc/win32/proc.c index 777367304..3073b1a27 100644 --- a/threadproc/win32/proc.c +++ b/threadproc/win32/proc.c @@ -256,6 +256,13 @@ APR_DECLARE(apr_status_t) apr_procattr_error_check_set(apr_procattr_t *attr, return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr, + apr_int32_t addrspace) +{ + /* won't ever be used on this platform, so don't save the flag */ + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *new, const char *progname, const char * const *args, |