title: How to name a subprocess in Python
body: <p>In Python 2.7, I have a producer which kicks off several subprocesses:</p>
  
  <pre class="lang-python prettyprint-override"><code>processes.append(subprocess.Popen(command, env=my_env)
  </code></pre>
  
  <p>I also have a consumer which checks the status of the subprocesses and then do some work:</p>
  
  <pre class="lang-python prettyprint-override"><code>for proc in processes:
      if proc.poll() is not None:
          # do some work
  </code></pre>
  
  <p>I need to assign each subprocess a name when kicking them off so that the consumer can print out something like:"<code>Subprocess xxx finished!</code>"</p>
  
  <p>How can I do that?</p>