title: AttributeError: module 'os' has no attribute 'setsid'
body: <p>I am trying to connect to MongoDB using Anaconda3 (64-bit). The code I am using:</p>
  
  <pre><code>import signal
  import subprocess
  
  
  
  proc = subprocess.Popen(['mongod'] preexec_fn=os.setsid)
  </code></pre>
  
  <p>But I am getting below error</p>
  
  <blockquote>
  <pre><code>AttributeError                            
  Traceback (most recent call last) &lt;ipython-input-45-f94c14f3a553&gt; in &lt;module&gt;()
        2 import subprocess
        3 #proc = subprocess.Popen('mongod', close_fds=True)
  ----&gt; 4 proc =subprocess.Popen(['mongod'], shell=True, preexec_fn=os.setsid)
  
  AttributeError: module 'os' has no attribute 'setsid'
  </code></pre>
  </blockquote>