perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@pobox.com>
Subject Re: mod_perl bug? PerlPassEnv fails on 2nd exec in pid
Date Wed, 01 Mar 2000 07:18:25 GMT
On Tue, 22 Feb 2000, Chris Thorman wrote:

> Hi,
> 
> using apache_1.3.6, mod_perl-1.21
> 
> PerlSetEnv VAR val  ==> always works; $ENV{VAR} is correctly defined
> PerlPassEnv VAR     ==> $ENV{VAR} is only defined on 1st exec by pid
> 
> There seems to be a bug where environment variables put into the environment using PerlPassEnv
appear correctly in a given child process's Embperl environment, but then "disappear" after
the first time that a child process has run an Embperl app -- and only the "standard" env
variables remain.
> 
> Those set with PerlSetEnv are not subject to this problem; they persist throughout all
executions of all apps in all pids.

hmm, strange this hasn't come up before, fix below.

--- perl_config.c	1999/12/30 19:16:39	1.82
+++ perl_config.c	2000/03/01 07:20:41
@@ -696,11 +696,9 @@
     if(PERL_RUNNING()) {
 	mp_PassEnv(arg);
     }
-    else {
-	char **entry;
-	entry = (char **)push_array(cls->PerlPassEnv);
-	*entry = pstrdup(parms->pool, arg);
-    }
+
+    *(char **)push_array(cls->PerlPassEnv) = pstrdup(parms->pool, arg);
+


Mime
View raw message