title: running command in background
body: <p>I am using python subprocess module to run some command and store its output in background. The command is deployed on my machine. Now whenever i run the command from shell prompt it works fine. But when I try to run the same command using subprocess module it gives following error</p>
  
  <p>The command to be executed is <code>vxswadm listswitch all</code></p>
  
  <pre><code>process = subprocess.Popen('vxswadm listswitch all &gt; tmp.txt &amp;',shell=True)          
  &gt;&gt;&gt; Traceback (most recent call last):
      File "/usr/bin/vxswadm", line 30, in &lt;module&gt;
      l.uname = os.getlogin()
      OSError: [Errno 25] Inappropriate ioctl for device
  </code></pre>
  
  <p>Can anyone help me out to fix this error . Any suggestions will be helpful. Thanks in advance   </p>
  
  <p>Tazim</p>