The very nature of environment variables is that they "belong" to a process. If you change them in one process, they won't change in the others. You should consider other methods of interprocess comunication. Perhaps a temporary file could be enough for your needs?