cvs commit: modperl-2.0/src/modules/perl modperl_perl.c

2002-02-28 Thread dougm

dougm   02/02/28 19:30:04

  Modified:src/modules/perl modperl_perl.c
  Log:
  trickery to prevent perl_destruct from freeing the environ array does
  not work in win32 service shutdown.  pull a different stunt to get the
  same effect, preventing the server from crashing.
  
  Revision  ChangesPath
  1.11  +18 -0 modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- modperl_perl.c11 Dec 2001 04:43:36 -  1.10
  +++ modperl_perl.c1 Mar 2002 03:30:03 -   1.11
  @@ -85,6 +85,7 @@
   
   void modperl_perl_destruct(PerlInterpreter *perl)
   {
  +char **orig_environ = NULL;
   dTHXa(perl);
   
   PERL_SET_CONTEXT(perl);
  @@ -97,7 +98,20 @@
* at least, not if modperl is doing things right
* this is a bug in Perl.
*/
  +#   ifdef WIN32
  +/*
  + * PL_origenviron = environ; doesn't work under win32 service.
  + * we pull a different stunt here that has the same effect of
  + * tricking perl into _not_ freeing the real 'environ' array.
  + * instead temporarily swap with a dummy array we malloc
  + * here which is ok to let perl free.
  + */
  +orig_environ = environ;
  +environ = safemalloc(2 * sizeof(char *));
  +environ[0] = NULL;
  +#   else
   PL_origenviron = environ;
  +#   endif
   #endif
   
   if (PL_endav) {
  @@ -113,4 +127,8 @@
   #ifndef WIN32
   perl_free(perl);
   #endif
  +
  +if (orig_environ) {
  +environ = orig_environ;
  +}
   }
  
  
  



cvs commit: modperl-2.0 INSTALL

2002-02-28 Thread stas

stas02/02/28 01:57:09

  Modified:.INSTALL
  Log:
  - correct the path
  
  Revision  ChangesPath
  1.2   +1 -1  modperl-2.0/INSTALL
  
  Index: INSTALL
  ===
  RCS file: /home/cvs/modperl-2.0/INSTALL,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- INSTALL   28 Feb 2002 09:50:27 -  1.1
  +++ INSTALL   28 Feb 2002 09:57:09 -  1.2
  @@ -1,3 +1,3 @@
  -See docs/src/docs/2.0/user/install/install.pod
  +See docs/user/install/install.pod
   
   
  
  
  



cvs commit: modperl-2.0 INSTALL

2002-02-28 Thread stas

stas02/02/28 01:50:27

  Added:   .INSTALL
  Log:
  add pointer for install docs
  Submitted by: Daniel R Risacher <[EMAIL PROTECTED]>
  
  Revision  ChangesPath
  1.1  modperl-2.0/INSTALL
  
  Index: INSTALL
  ===
  See docs/src/docs/2.0/user/install/install.pod