Comment 2 for bug 592662

Revision history for this message
Maciej Muehleisen (mue-comnets) wrote :

import subprocess
p = subprocess.Popen("ls -R ./", shell=True, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True)
p.wait()

This subprocess (listing directories recursively) produces a lot of output and therefore blocks when nobody "collects" it from stderr and stdin. In the shell "ls -R" takes a few seconds and is done. Above code results in a deadlock.