Re: [PATCH] Work around performance bug in subprocess.Popen.communicate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009-07-31 12:27:53 +0100, Catalin Marinas wrote:

> But can this not lead to a deadlock if the __indata is big? The
> stdout of the created process is only processed once the whole
> __indata is written. I thought communicate() was created to avoid
> this issue.

I don't think there's a problem. write() isn't supposed to have a
limit on the amount of data it will accept in one call, as far as I'm
aware. Plus, it works just fine with Erik's test case---which in my
case was about 7 MB. If it can handle 7 MB, I doubt there's a limit
we'll hit anytime soon.

Oh, and we still call communicate()---we just don't pass it any
additional bytes to write to stdin.

-- 
Karl Wiberg, Virtutech
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]