cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm

2001-09-28 Thread dougm

dougm   01/09/28 10:27:46

  Modified:src/modules/perl mod_perl.c modperl_env.c
   t/response/TestApache cgihandler.pm
  Log:
  current implementation of tie %ENV to $r->subprocess_env
  is not threadsafe, so back it out for now
  
  Revision  ChangesPath
  1.81  +8 -0  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.80
  retrieving revision 1.81
  diff -u -r1.80 -r1.81
  --- mod_perl.c2001/09/28 17:15:07 1.80
  +++ mod_perl.c2001/09/28 17:27:45 1.81
  @@ -527,13 +527,21 @@
   h_stdout = modperl_io_tie_stdout(aTHX_ r);
   h_stdin  = modperl_io_tie_stdin(aTHX_ r);
   
  +#if 0
  +/* current implementation of tie %ENV to $r->subprocess_env 
  + * is not threadsafe
  + */
   modperl_env_request_tie(aTHX_ r);
  +#endif
  +
   retval = modperl_response_handler_run(r, FALSE);
   
   modperl_io_handle_untie(aTHX_ h_stdout);
   modperl_io_handle_untie(aTHX_ h_stdin);
   
  +#if 0
   modperl_env_request_untie(aTHX_ r);
  +#endif
   
   modperl_perl_global_restore(aTHX_ &rcfg->perl_globals);
   
  
  
  
  1.11  +6 -0  modperl-2.0/src/modules/perl/modperl_env.c
  
  Index: modperl_env.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_env.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_env.c 2001/09/28 17:15:08 1.10
  +++ modperl_env.c 2001/09/28 17:27:45 1.11
  @@ -133,6 +133,12 @@
   }
   #endif
   
  +/*
  + * XXX: PL_vtbl_* are global (not per-interpreter)
  + * so this method of tie-ing is not thread-safe
  + * overridding svt_get is only useful with 5.7.2+ and requires
  + * a smarter lookup than the current modperl_env_request_get
  + */
   void modperl_env_request_tie(pTHX_ request_rec *r)
   {
   EnvMgObj = (char *)r;
  
  
  
  1.6   +4 -1  modperl-2.0/t/response/TestApache/cgihandler.pm
  
  Index: cgihandler.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/cgihandler.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- cgihandler.pm 2001/08/01 17:03:19 1.5
  +++ cgihandler.pm 2001/09/28 17:27:46 1.6
  @@ -24,7 +24,10 @@
   else {
   print "1..3\n";
   print "ok 1\n", "ok ", "$ENV{FOO}\n";
  -my $foo = $r->subprocess_env->get('FOO');
  +#XXX: current implementation of tie %ENV to $r->subprocess_env
  +# is not threadsafe
  +#my $foo = $r->subprocess_env->get('FOO');
  +my $foo = $ENV{FOO};
   $foo++;
   print "ok $foo\n";
   }
  
  
  



cvs commit: modperl-2.0/t/response/TestApache cgihandler.pm

2001-08-01 Thread dougm

dougm   01/08/01 10:03:19

  Modified:t/response/TestApache cgihandler.pm
  Log:
  workaround for modules/cgi #3 failure
  
  Revision  ChangesPath
  1.5   +4 -1  modperl-2.0/t/response/TestApache/cgihandler.pm
  
  Index: cgihandler.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestApache/cgihandler.pm,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- cgihandler.pm 2001/06/08 01:04:56 1.4
  +++ cgihandler.pm 2001/08/01 17:03:19 1.5
  @@ -15,7 +15,10 @@
   if ($r->method_number == Apache::M_POST) {
   my $ct = $r->headers_in->get('content-length');
   my $buff;
  -read STDIN, $buff, $ct;
  +#XXX: working around a bug in ithreads Perl
  +#that would cause modules/cgi #3 to fail
  +#read STDIN, $buff, $ct;
  +read 'STDIN', $buff, $ct;
   print $buff;
   }
   else {