stas        2003/03/19 16:04:54

  Modified:    src/modules/perl modperl_interp.c
               .        Changes
  Log:
  Since non-threaded mpms don't use tipools in mips, don't create and
  destroy them.
  
  Revision  Changes    Path
  1.55      +12 -10    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.54
  retrieving revision 1.55
  diff -u -r1.54 -r1.55
  --- modperl_interp.c  23 Nov 2002 23:25:32 -0000      1.54
  +++ modperl_interp.c  20 Mar 2003 00:04:53 -0000      1.55
  @@ -168,9 +168,11 @@
   {
       modperl_interp_pool_t *mip = (modperl_interp_pool_t *)data;
   
  -    modperl_tipool_destroy(mip->tipool);
  -    mip->tipool = NULL;
  -
  +    if (mip->tipool) {
  +        modperl_tipool_destroy(mip->tipool);
  +        mip->tipool = NULL;
  +    }
  +    
       if (MpInterpBASE(mip->parent)) {
           /* multiple mips might share the same parent
            * make sure its only destroyed once
  @@ -227,12 +229,12 @@
       modperl_interp_pool_t *mip = 
           (modperl_interp_pool_t *)apr_pcalloc(p, sizeof(*mip));
   
  -    modperl_tipool_t *tipool = 
  -        modperl_tipool_new(p, scfg->interp_pool_cfg,
  -                           &interp_pool_func, mip);
  -
  -    mip->tipool = tipool;
  -    mip->server  = s;
  +    if (scfg->threaded_mpm) {
  +        mip->tipool = modperl_tipool_new(p, scfg->interp_pool_cfg,
  +                                         &interp_pool_func, mip);
  +    }
  +    
  +    mip->server = s;
       mip->parent = modperl_interp_new(mip, NULL);
       aTHX = mip->parent->perl = perl;
       
  @@ -496,7 +498,7 @@
                                modperl_interp_mip_walker_t walker,
                                void *data)
   {
  -    modperl_list_t *head = mip->tipool->idle;
  +    modperl_list_t *head = mip->tipool ? mip->tipool->idle : NULL;
   
       if (!current_perl) {
           current_perl = PERL_GET_CONTEXT;
  
  
  
  1.152     +3 -0      modperl-2.0/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.151
  retrieving revision 1.152
  diff -u -r1.151 -r1.152
  --- Changes   17 Mar 2003 02:15:10 -0000      1.151
  +++ Changes   20 Mar 2003 00:04:54 -0000      1.152
  @@ -10,6 +10,9 @@
   
   =item 1.99_09-dev
   
  +Since non-threaded mpms don't use tipools in mips, don't create and
  +destroy them. [Stas]
  +
   re-use the workaround for glibc/Perl-5.8.0 crypt() bug for the
   main/vhost base perl interpreters as well. This solves the problem for
   the buggy glibc on RH8.0. [Stas]
  
  
  

Reply via email to