Message172021
> Well, the theoretical deadlock's just if stdin is also a pipe, right?
If I remember correctly, the parent process (Python) and the child
process (file) can be blocked if the child is blocked in a blocking
write into a pipe (ex: stderr), whereas the pipe buffer is full (the
size of the buffer is usually 4096 bytes) and the parent is reading
all content of another pipe (ex: stdout). So it occurs if the process
uses more than 1 pipe for standard input/output streams. In the case
of platform, it looks like the issue cannot occur.
I always prefer communicate() because I consider it safer :-)
> Though it might be worth passing DEVNULL to stdin instead of inheriting, just to be tidy.
Yeah, maybe. As you want. |
|
Date |
User |
Action |
Args |
2012-10-04 23:19:43 | vstinner | set | recipients:
+ vstinner, lemburg, jcea, pitrou, python-dev, David.Benjamin |
2012-10-04 23:19:43 | vstinner | link | issue16112 messages |
2012-10-04 23:19:42 | vstinner | create | |
|