Environment variables are inherited by the child processes, but each child receives a copy - if you subsequently change the parent environment, this will not affect the child.
This is for security reasons. If the variables were separated, the processes could see in each other's memory, which could cause all kinds of problems.
So, the solution is to set the variable before starting a new process.
If you need to communicate with an existing child process, use the channel.