perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Wittkoski" <>
Subject Re: [mp1] subprocess_env and non-mod_perl handlers
Date Tue, 04 May 2004 19:38:14 GMT

Geoffrey Young wrote on 5/3/04, 8:02 PM:

 > > Example 2:
 > >
 > > Basically the same except I have a C handler defined for TypeHandler
 > and
 > >   a mod_perl handler defined for FixupHandler. When the C code does:
 > >
 > > ap_table_set(r->subprocess_env, "TEST", "value");
 > >
 > > The mod_perl handler for FixupHandler doesn't see it using:
 > >
 > > $something = $r->subprocess_env("TEST");

 > > However, as mentioned in many of the docs/books, this is expensive
 > and I
 > > really only need the one variable.
 > >
 > > I've also tried walking the subprocess_env table in the perl handler,
 > > but the value set in the C handler is not there.
 > that's really strange.  are you sure that you are not removing it in your
 > application someplace?  try tweaking the test tarball I mentioned bit
 > by bit
 > until it has the relevant logic from your code in it.  I can't tell
 > you the
 > number of bugs I've "fixed" by trying to reproduce the bug, only to
 > find I
 > was the bug :)

So I haven't been able to get very far on the code to test this further, 
but in the Eagle book I noticed this (section 9.1.4):

"subprocess_env() is only required if you need to change the environment 
in a subprocess launched by a different handler or module."

So what would happen if the C module is setting it's own ENV instead of 
using ap_table_set? Would that explain why I can't see the value in the 
perl module using subprocess_env, but when I call void subprocess_env(), 
the value suddenly appears in %ENV and the subprocess table?


Report problems:
Mail list info:
List etiquette:

View raw message