The original patch made into 5.6.1 but not in subsequent
versions that I can detect since I don't see the JPL or
NEED_DUP_ENVIRON_FOR_MODIFY defines. Jarkko updated the
patch for 5.8.1 and it's working there. However, I wonder
if its not making the cut after 5.6.1 was oversight or
deliberate euthanasia...
We're worried that Jarkko's 5.8.1 patch will eventually stop
working altogether as Perl marches on. JPL's heavily used
here in several large legacy Java applications so its loss
would cause major pain. A couple of us would gladly act as
custodians for the code and try to pitch in in whatever way
we're able.
Rgds,
--
Charles DeRykus
I don't know much about JPL, but I was faced with this problem a while
back with my
Inline::Java project. I managed to overcome the problem by copying the
environment
myself before calling perl_parse:
char *args[] = {"inline-java", "-e1"} ;
int envl = 0 ;
int i = 0 ;
char **envdup = NULL ;
/* This will leak, but it's a one shot... */
for (i = 0 ; environ[i] != NULL ; i++){
envl++ ;
}
envdup = (char **)calloc(envl + 1, sizeof(char *)) ;
for (i = 0 ; i < envl ; i++){
envdup[i] = strdup(environ[i]) ;
}
interp = perl_alloc() ;
perl_construct(interp) ;
perl_parse(interp, xs_init, 2, args, envdup) ;
perl_run(interp) ;
It seemed to work for me without having to patch or
recompile perl (but maybe my perl was already patched? I use
just a standard RedHat 9.0 perl).
Maybe this soultion be applied to JPL?
Patrick