Skip to content

Use 'communicate()' to avoid deadlocks in '_call_security' #81

Fabio Niephaus requested to merge fniephaus:patch-1 into master

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

Merge request reports