title: execute "shell" command from python with subprocess & multiprocessing
body: <p>I am currently launching the serials shell commands from python with subprocess and multiprocessing. here code is not real one, but similar :</p>
  
  <pre><code>    def fakeFunc(cmd):
          print("the pid "+str(os.getpid())+"begin", end=":")
          process=Popen(cmd, stdout=PIPE, shell=True, stderr=STDOUT)
          for line in iter(process.stdout.readline,b''):
              line_str=line.decode(sys.stdout.encoding)
              ##### analyse line_str######
      with Pool() as pool:
          cmds=['mkdir -p /home/jeff/workspace/zebu/compile/vdv &amp;&amp; cd /home/jeff/workspace/zebu/compile/vdv &amp;&amp; compile', 'mkdir -p /home/jeff/workspace/zebu/compile/vdr &amp;&amp; cd /home/jeff/workspace/zebu/compile/vdr &amp;&amp; compile', 'mkdir -p /home/jeff/workspace/zebu/compile/rdv &amp;&amp; cd /home/jeff/workspace/zebu/compile/rdv &amp;&amp; compile']
          pool.map_async(fakeFunc, cmds)
          pool.close()
          pool.join()
  </code></pre>
  
  <p>it seems that only the last one in cmds has been executed, other three ones jump out of function after the <code>print("the pid "+str(os.getpid())+"begin", end=":")</code>. any help is appreciated</p>