thraxil.org:

Reply to: Subprocess Hanging: PIPE is your enemy

Like many others I ran into this problem as well. The issue seems to be in the way the Linux Kernel implements pipes, from the pipe(7) man page:

"In Linux versions before 2.6.11, the capacity of a pipe was the same as the system page size (e.g., 4096 bytes on i386). Since Linux 2.6.11, the pipe capacity is 65536 bytes."

Granted Python could come up with a version of communicate() that allows python to read from the child's stdout without waiting for the child process to complete.


formatting is with Markdown syntax. Comments are not displayed until they are approved by a moderator. Moderators will not approve unless the comment contributes value to the discussion.

namerequired
emailrequired
url
remember info?