Use 'communicate()' to avoid deadlocks in '_call_security' #81
Following up on #81 (closed):
This PR fixes a deadlock problem caused by p.wait()
. Instead, it is recommended to use communicate()
:
Warning This will deadlock when using stdout=PIPE and/or stderr=PIPE and the child process generates enough output to a pipe such that it blocks waiting for the OS pipe buffer to accept more data. Use communicate() to avoid that.
https://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait