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...@locus.apache.org on 2000/03/06 00:45:02 UTC

cvs commit: modperl/t TEST

dougm       00/03/05 15:45:01

  Modified:    .        Changes ToDo
               src/modules/perl mod_perl.c
               t        TEST
  Log:
  __THE__ dso fix: dlclose() xs shared objects and call perl_shutdown()
  before mod_perl's libperl.so is unloaded/reloaded by mod_so
  
  Revision  Changes    Path
  1.403     +4 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.402
  retrieving revision 1.403
  diff -u -r1.402 -r1.403
  --- Changes	2000/03/05 01:26:57	1.402
  +++ Changes	2000/03/05 23:44:59	1.403
  @@ -10,6 +10,10 @@
   
   =item 1.21_01-dev
   
  +__THE__ dso fix: dlclose() xs shared objects and call perl_shutdown()
  +before mod_perl's libperl.so is unloaded/reloaded by mod_so
  +[Daniel Jacobowitz <dr...@false.org>, Alan Burlison <Al...@uk.sun.com>]
  +
   add  /D "_MSWSOCK_" to ApacheModulePerl.dsp
   [Randy Kobes <ra...@theoryx5.uwinnipeg.ca>]
   
  
  
  
  1.230     +9 -8      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /home/cvs/modperl/ToDo,v
  retrieving revision 1.229
  retrieving revision 1.230
  diff -u -r1.229 -r1.230
  --- ToDo	2000/03/04 21:02:26	1.229
  +++ ToDo	2000/03/05 23:44:59	1.230
  @@ -6,9 +6,6 @@
   - recursion triggered by internal_redirect() called by a pushed handler
   [Ashish Goyal <as...@linux-delhi.org>]
   
  -- dso fixes
  -[Daniel Jacobowitz <dr...@false.org>, Alan Burlison <Al...@uk.sun.com>]
  -
   - Support of <CR> <LF> in a EBCDIC environment
   [Ignasi Roca <ig...@fujitsu.siemens.es>]
   
  @@ -26,9 +23,6 @@
   
   - PERL_STATIC_EXTS doesnt work with USE_APACI=1
   
  -- PerlRun::flush_namespace needs to check if_owner for all types, not
  -just cvs [John M Vinopal <jv...@abattoir.com>]
  -
   - solaris Perl Configure adds a space before -R in ccdlflags, see
     about removing that
     [Ken McNamara <co...@oaktree.net>]
  @@ -40,8 +34,6 @@
     e.g. libmodperl.so 
     [Eugene B. Byrganov <E.B.Byrganov@inp.nsk.su]
   
  -- should $r->content unset $r->headers_in('content-length') ?
  -
   - update url to Randy Kobes' win32 binary
   
   - fix t/httpd symlink logic ["Young, Geoffrey S." <yo...@acwilm.com>]
  @@ -68,6 +60,15 @@
   
   - coderef to $r->custom_response
   [Randal L. Schwartz <me...@stonehenge.com>]
  +
  +- PerlRun::flush_namespace needs to check if_owner for all types, not
  +just cvs.  NOTE: i dont think this is possible, only CVs have a GV
  +pointer attached -dougm
  +[John M Vinopal <jv...@abattoir.com>]
  +
  +- should $r->content unset $r->headers_in('content-length') ?
  +NOTE: im worried this could break apps who need to know content-length 
  +after data has been read
   
   ---------------------------------------------------------------------------
   KNOWN BUGS
  
  
  
  1.101     +48 -1     modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -r1.100 -r1.101
  --- mod_perl.c	2000/03/04 20:53:14	1.100
  +++ mod_perl.c	2000/03/05 23:45:00	1.101
  @@ -271,7 +271,8 @@
       perl_run_endav("perl_shutdown"); 
   
       MP_TRACE_g(fprintf(stderr, 
  -		     "destructing and freeing Perl interpreter..."));
  +		     "destructing and freeing Perl interpreter (level=%d)...",
  +	       perl_destruct_level));
   
       perl_util_cleanup();
   
  @@ -414,9 +415,51 @@
       if(orig_inc) SvREFCNT_dec(orig_inc); \
       orig_inc = av_copy_array(GvAV(incgv))
   
  +#define dl_librefs "DynaLoader::dl_librefs"
  +#define dl_modules "DynaLoader::dl_modules"
  +
  +static void unload_xs_so(void)
  +{
  +    I32 i;
  +    AV *librefs = perl_get_av(dl_librefs, FALSE);
  +    AV *modules = perl_get_av(dl_modules, FALSE);
  +
  +    if (!librefs) {
  +	MP_TRACE_g(fprintf(stderr, 
  +			   "Could not get @%s for unloading.\n",
  +			   dl_librefs));
  +	return;
  +    }
  +	
  +    for (i=0; i<=AvFILL(librefs); i++) {
  +	void *handle;
  +	SV *handle_sv = *av_fetch(librefs, i, FALSE);
  +	SV *module_sv = *av_fetch(modules, i, FALSE);
  +
  +	if(!handle_sv) {
  +	    MP_TRACE_g(fprintf(stderr, 
  +			       "Could not fetch $%s[%d]!\n",
  +			       dl_librefs, (int)i));
  +	    continue;
  +	}
  +	handle = (void *)SvIV(handle_sv);
  +
  +	MP_TRACE_g(fprintf(stderr, "unload_xs_so: %s (0x%lx)\n",
  +			   SvPVX(module_sv), (unsigned long)handle));
  +	if (handle) {
  +	    ap_os_dso_unload(handle);
  +	}
  +    }
  +
  +    av_clear(modules);
  +    av_clear(librefs);
  +}
  +
   #if MODULE_MAGIC_NUMBER >= MMN_130
   static void mp_dso_unload(void *data) 
   { 
  +#if 0
  +
       module *modp;
   
       if(!PERL_DSO_UNLOAD)
  @@ -433,6 +476,10 @@
   	    modp->dynamic_load_handle = NULL;
   	}
       }
  +#else
  +    unload_xs_so();
  +    perl_shutdown(NULL, NULL);
  +#endif
   } 
   #endif
   
  
  
  
  1.11      +1 -1      modperl/t/TEST
  
  Index: TEST
  ===================================================================
  RCS file: /home/cvs/modperl/t/TEST,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- TEST	1999/08/03 21:34:45	1.10
  +++ TEST	2000/03/05 23:45:00	1.11
  @@ -79,7 +79,7 @@
       else {
           print "still waiting for server to warm up...";
       }
  -    for (1..3) {
  +    for (1..4) {
           sleep $_;
           if (simple_fetch "/test.html") {
               print "ok\n";