title: OS environment variable reading in a spawned process
body: <p>This is similar to <a href="https://stackoverflow.com/questions/25684349/can-os-environpythonhashseed-be-set-dynamically-from-within-an-application">a previous question</a> but for <code>multiprocessing</code> instead of <code>subprocess</code>. It seems that changing dynamically <code>PYTHONHASHSEED</code> has no effect when using <code>multiprocessing</code>, unlike <code>subprocess</code>:</p>
  
  <pre><code>#check_environ.py
  import os, multiprocessing, subprocess, sys
  
  s = 'hello'
  print('parent', os.getenv('PYTHONHASHSEED'), hash(s))
  
  if len(sys.argv) &gt; 1:
      os.environ['PYTHONHASHSEED'] = sys.argv[1]
  subprocess.call(['python', '-c', "import os;print('subprocess', os.getenv('PYTHONHASHSEED'), hash('{}'))".format(s)])
  multiprocessing.Process(target=lambda:print('multiprocessing', os.getenv('PYTHONHASHSEED'), hash(s))).start()
  </code></pre>
  
  <p>Sample runs:</p>
  
  <pre><code># explicit PYTHONHASHSEED for subprocess/multiprocessing 
  $ python check_environ.py 12
  
  parent None 4472558296122225349
  subprocess 12 -8207222429063474615
  multiprocessing 12 4472558296122225349
  
  # random PYTHONHASHSEED for subprocess/multiprocessing 
  $ python check_environ.py
  
  parent None 7990499464460966677
  subprocess None 1081030409066486350
  multiprocessing None 7990499464460966677
  </code></pre>
  
  <p>So no matter what, the <code>multiprocessing</code> hash uses the same seed as the parent. Is there a way to force subprocesses spawned by <code>multiprocessing</code> use a different hash seed?</p>