Hi,
I am having very strange problem with environment variables.
>From Apache::PerlRun script(cgi) I am setting env and firing background
process ..
system("$command &") (or print `$command &`;)
now looks like environment variable being persistence b/w different
requests ONLY in background process. so it's looks to me that mod_perl
is setting proper "Perl Level" env but failing to reset env at "c level"
or "process level". I know it's sounds very weird.
/perl-status?env is printing correctly but my background process
($command) is printing few extra env, which i set it in different cgi
script.
e.g. "script1.pl" is setting $ENV{foo1} = "foo1" and firing print
`command1 &`;
and "script2.pl" is setting $ENV{foo2} = "foo2" and firing print
`command2 &`;
after few hits both env(foo1 and foo2) are visible to both background
processes.
while /perl-status?env is displaying correctly.
Here command1 and command2(perl scripts) are just printing env
Apache/1.3.9 (Unix) mod_perl/1.21
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=solaris, osvers=2.6, archname=sun4-solaris
uname='sunos nlsun268 5.6 generic_105181-14 sun4u sparc sunw,ultra-4
'
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='gcc', optimize='-O', gccversion=2.8.1
cppflags='-I/usr/local/include'
ccflags ='-I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
alignbytes=8, usemymalloc=y, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lc -lcrypt
libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
cccdlflags='-fPIC', lddlflags='-G -L/usr/local/lib'
Any comments?
Thanks,
Niraj