After a few days working with what the system is doing here's what i came up with and my problem.
I execute a perl command via unix ".forward" file for incoming email. Piping the email contents to the script.
When the script executes it runs in a shell as the UID who is reciving the emails. However the actual environment for that user doesn't exist. (IE: No environment variables are available).
I need the environment available for the process to successfully complete it's task, so i tried to envoke the environment by doing both a system("/usr/local/me/.profile") command. This didn't work because it appears that when you envoke the Perl System command you create a child shell to run the process in and when it's done, the shell is gone.
So next i tried to envoke the environment with the backticks. `. /usr/local/me/.profile`
This didn't work either but i'm not sure why... Does it create a child shell as well?
Is it possible to envoke all the environment settings in the ".profile" file and have them availble to the current process? Or am i trying something that is impossible with Perl?
Thanks for any help.
B. Stopp
I execute a perl command via unix ".forward" file for incoming email. Piping the email contents to the script.
When the script executes it runs in a shell as the UID who is reciving the emails. However the actual environment for that user doesn't exist. (IE: No environment variables are available).
I need the environment available for the process to successfully complete it's task, so i tried to envoke the environment by doing both a system("/usr/local/me/.profile") command. This didn't work because it appears that when you envoke the Perl System command you create a child shell to run the process in and when it's done, the shell is gone.
So next i tried to envoke the environment with the backticks. `. /usr/local/me/.profile`
This didn't work either but i'm not sure why... Does it create a child shell as well?
Is it possible to envoke all the environment settings in the ".profile" file and have them availble to the current process? Or am i trying something that is impossible with Perl?
Thanks for any help.
B. Stopp