You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@apache.org on 2001/04/25 07:27:17 UTC

cvs commit: modperl-2.0/src/modules/perl modperl_interp.c modperl_util.c modperl_util.h

dougm       01/04/24 22:27:17

  Modified:    src/modules/perl modperl_interp.c modperl_util.c
                        modperl_util.h
  Log:
  use apr_os_dso_handle_put/apr_dso_unload rather than the unportable dlclose()
  
  Revision  Changes    Path
  1.32      +1 -1      modperl-2.0/src/modules/perl/modperl_interp.c
  
  Index: modperl_interp.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_interp.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- modperl_interp.c	2001/04/09 23:57:22	1.31
  +++ modperl_interp.c	2001/04/25 05:27:17	1.32
  @@ -98,7 +98,7 @@
       perl_free(interp->perl);
   
       if (handles) {
  -        modperl_xs_dl_handles_close(handles);
  +        modperl_xs_dl_handles_close(p, handles);
       }
   
       apr_pool_destroy(p);
  
  
  
  1.9       +8 -5      modperl-2.0/src/modules/perl/modperl_util.c
  
  Index: modperl_util.c
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- modperl_util.c	2001/04/25 03:13:59	1.8
  +++ modperl_util.c	2001/04/25 05:27:17	1.9
  @@ -162,7 +162,7 @@
       return handles;
   }
   
  -void modperl_xs_dl_handles_close(apr_array_header_t *handles)
  +void modperl_xs_dl_handles_close(apr_pool_t *p, apr_array_header_t *handles)
   {
       int i;
   
  @@ -171,10 +171,13 @@
       }
   
       for (i=0; i < handles->nelts; i++) {
  -	void *handle = ((void **)handles->elts)[i];
  -	MP_TRACE_g(MP_FUNC, "close 0x%lx\n",
  -                   (unsigned long)handle);
  -	dlclose(handle); /*XXX*/
  +        apr_dso_handle_t *dso = NULL;
  +        void *handle = ((void **)handles->elts)[i];
  +
  +        MP_TRACE_g(MP_FUNC, "close 0x%lx\n", (unsigned long)handle);
  +
  +        apr_os_dso_handle_put(&dso, (apr_os_dso_handle_t )handle, p);
  +        apr_dso_unload(dso);
       }
   }
   
  
  
  
  1.10      +1 -1      modperl-2.0/src/modules/perl/modperl_util.h
  
  Index: modperl_util.h
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- modperl_util.h	2001/04/25 03:13:59	1.9
  +++ modperl_util.h	2001/04/25 05:27:17	1.10
  @@ -35,7 +35,7 @@
   
   apr_array_header_t *modperl_xs_dl_handles_get(pTHX_ apr_pool_t *p);
   
  -void modperl_xs_dl_handles_close(apr_array_header_t *handles);
  +void modperl_xs_dl_handles_close(apr_pool_t *p, apr_array_header_t *handles);
   
   modperl_cleanup_data_t *modperl_cleanup_data_new(apr_pool_t *p, void *data);