passing env to child processes

David R. Waddell dave.waddell at wcom.com
Thu Aug 30 18:24:39 CDT 2001


I use the brute force method. I set up the environment in the
spawned process that it needs (if it is a perl script). I thought
this was only a problem with remote calls (rsh or rcp) to another
box.

On a related issue, I noticed that on Solaris the LD_LIBRARY_PATH does
not get exported to processes started with "system" calls. However, PATH
does. I noticed this some time ago and I think ksh had the same behaviour
so I suspected it was a problem with Solaris. I was wondering if this also
happens under Linux or other nixes.

At 12:23 PM 8/30/01 -0600, you wrote:
>Is there a way to ensure the environment gets passed on to child processes
>from Perl?  I am having a bit of trouble with this.  I thought this was done
>automatically but I guess not.  I tried a simple test by creating a shell
>script that sets up some environment variables then calls a Perl script that
>in turn calls another shell script which simply runs the env command.  This
>last script is not inheriting the environment of the initial shell script as
>I had hoped.
>Thanks,
>J
>
>



More information about the Pikes-peak-pm mailing list