title: Prevent subprocess of subprocess from writing to stdout
body: <p>I'm calling a subprocess and want to disable any output to my shell. I'm trying to do this with:</p>
  
  <pre><code> with tempfile.TemporaryFile() as tempf:
          proc = Popen(cmd, stdout=tempf, stderr=tempf)
          proc.communicate()
  </code></pre>
  
  <p>But there is still some output (but less than normally) appearing at the terminal. Could the problem be that the called process uses <code>os.execvp</code>? Any suggestions to fully disable the output for all subprocesses?</p>
  
  <p><strong>Note</strong></p>
  
  <p>Redirecting to devnull is a better way of disabling output:</p>
  
  <pre><code>with open(os.devnull, 'w') as tempf:
      proc = Popen(cmd, stdout=tempf, stderr=tempf)
      proc.communicate()
  </code></pre>
  
  <p><strong>Question answered!</strong></p>
  
  <p>Very simple solution: The called process uses CORBA and the server is actually printing out.</p>