title: Run a program from python, and have it continue to run after the script is killed
body: <p>I've tried running things like this:</p>
  
  <pre><code>subprocess.Popen(['nohup', 'my_command'],
                   stdout=open('/dev/null', 'w'),
                   stderr=open('logfile.log', 'a'))
  </code></pre>
  
  <p>This works if the parent script exits gracefully, but if I kill the script (Ctrl-C), all my child processes are killed too. Is there a way to avoid this?</p>
  
  <p>The platforms I care about are OS X and Linux, using Python 2.6 <em>and</em> Python 2.7.</p>