[EMAIL PROTECTED] wrote:
clar        2004/06/14 10:26:20

Modified: include apr_thread_proc.h
include/arch/netware apr_arch_threadproc.h
threadproc/beos proc.c
threadproc/netware proc.c
threadproc/os2 proc.c
threadproc/unix proc.c
threadproc/win32 proc.c
Log:
Added new APR API to load child process in current or new address space (NetWare ONLY).
Replaced changes that added APR_PROGRAM_ADDRSPACE committed 6/11/04.
Reviewed by Brad Nicholes
Revision Changes Path
1.107 +9 -3 apr/include/apr_thread_proc.h
Index: apr_thread_proc.h
===================================================================
RCS file: /home/cvs/apr/include/apr_thread_proc.h,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- apr_thread_proc.h 11 Jun 2004 20:13:19 -0000 1.106
+++ apr_thread_proc.h 14 Jun 2004 17:26:19 -0000 1.107
@@ -42,9 +42,6 @@
*/
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 */
@@ -516,6 +513,15 @@
*/
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.

our

  + */
  +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
  +                                                       apr_int32_t 
addrspace);

so if caller passes 1 for addrspace it starts the child starts in our address space?


but...

1.29 +9 -3 apr/threadproc/netware/proc.c
Index: proc.c
===================================================================
RCS file: /home/cvs/apr/threadproc/netware/proc.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- proc.c 11 Jun 2004 20:23:09 -0000 1.28
+++ proc.c 14 Jun 2004 17:26:19 -0000 1.29
...
APR_DECLARE(apr_status_t) apr_proc_create(apr_proc_t *newproc,
const char *progname, const char * const *args, @@ -287,7 +293,7 @@
/* 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);

if caller passed 1 then attr->addrspace will be 1 and we won't turn on the PROC_CURRENT_SPACE flag? isn't that the opposite of what is desired?


(I'm assuming, perhaps incorrectly, that the PROC_CURRENT_SPACE flags says to run the child in the current address space)

Reply via email to