Find the answer to your Linux question:
Results 1 to 2 of 2
Hi there, I am using Debian for Alix, the Debian distribution specifically geared towards PC Engines boards. The Linux kernel version is 2.6.32-5-686 I wanted to know if the read/write ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2012
    Posts
    12

    environment variables synchronization


    Hi there,

    I am using Debian for Alix, the Debian distribution specifically geared towards PC Engines boards. The Linux kernel version is 2.6.32-5-686

    I wanted to know if the read/write of environment variables is synchronized, to prevent race conditions from arising if different processes are manipulating them?

    I suppose I could test this or read a manual somewhere, but I thought this route would be a good start too.

    Thanks.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,753
    Environment variable changes are local only to the process (and children of that process) that makes the changes. There is no race condition, and after the application that set them terminates, the variables are unchanged from what they were before the application started. IE, if 100 processes change an environment variable, then there are 100 versions, and processes outside of the one that changed them, and its child processes, will be aware of what those changes may be.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •