apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: apr/threadproc/win32 proc.c
Date Mon, 14 Jun 2004 17:26:20 GMT
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. 
  + */
  +APR_DECLARE(apr_status_t) apr_procattr_addrspace_set(apr_procattr_t *attr,
  +                                                       apr_int32_t addrspace);
   
   #if APR_HAS_FORK
   /**
  
  
  
  1.4       +1 -0      apr/include/arch/netware/apr_arch_threadproc.h
  
  Index: apr_arch_threadproc.h
  ===================================================================
  RCS file: /home/cvs/apr/include/arch/netware/apr_arch_threadproc.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- apr_arch_threadproc.h	13 Feb 2004 09:38:29 -0000	1.3
  +++ apr_arch_threadproc.h	14 Jun 2004 17:26:19 -0000	1.4
  @@ -60,6 +60,7 @@
       char *currdir;
       apr_int32_t cmdtype;
       apr_int32_t detached;
  +    apr_int32_t addrspace;
   };
   
   struct apr_thread_once_t {
  
  
  
  1.52      +7 -0      apr/threadproc/beos/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/beos/proc.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- proc.c	13 Feb 2004 09:38:36 -0000	1.51
  +++ proc.c	14 Jun 2004 17:26:19 -0000	1.52
  @@ -178,6 +178,13 @@
       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, 
  
  
  
  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
  @@ -173,8 +173,7 @@
   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 @@
       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 @@
       /* 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) {
  
  
  
  1.61      +7 -0      apr/threadproc/os2/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/os2/proc.c,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- proc.c	13 Feb 2004 09:38:37 -0000	1.60
  +++ proc.c	14 Jun 2004 17:26:19 -0000	1.61
  @@ -255,6 +255,13 @@
       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,
  
  
  
  1.73      +7 -0      apr/threadproc/unix/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/unix/proc.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- proc.c	13 Feb 2004 09:38:37 -0000	1.72
  +++ proc.c	14 Jun 2004 17:26:19 -0000	1.73
  @@ -273,6 +273,13 @@
       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,
  
  
  
  1.92      +7 -0      apr/threadproc/win32/proc.c
  
  Index: proc.c
  ===================================================================
  RCS file: /home/cvs/apr/threadproc/win32/proc.c,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- proc.c	13 Feb 2004 09:38:38 -0000	1.91
  +++ proc.c	14 Jun 2004 17:26:20 -0000	1.92
  @@ -256,6 +256,13 @@
       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,
  
  
  

Mime
View raw message