[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-19 Thread Sworddragon
Sworddragon added the comment: Ah, now I see it. Thanks for your hint. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Uns

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-19 Thread R. David Murray
R. David Murray added the comment: Try it at the command line. Diff doesn't produce any output in your example until stdin is closed. -- ___ Python tracker ___

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-19 Thread Sworddragon
Sworddragon added the comment: But this happens also on read(1). I'm even getting no partly output. 1. I'm calling diff in a way where it expects input to compare. 2. I'm writing and flushing to diff's stdin. 3. diff seems to not get this content until I close its stdin. -- ___

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-19 Thread R. David Murray
R. David Murray added the comment: Because stdout isn't closed until the process completes, which happens when stdin is closed. -- ___ Python tracker ___ ___

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-19 Thread Sworddragon
Sworddragon added the comment: Why must stdin of the subprocess be closed so that a read() on stdout can return? -- ___ Python tracker ___ __

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread R. David Murray
R. David Murray added the comment: This has nothing to do with subprocess. If you call a (blocking and unlimited) read() on a file, the read will not return until the file is closed. -- nosy: +r.david.murray resolution: -> not a bug stage: -> resolved status: open -> closed

[issue22439] subprocess.PIPE.stdin.flush() causes to hang while subprocess.PIPE.stdin.close() not

2014-09-18 Thread Sworddragon
New submission from Sworddragon: On sending something to stdin of a process that was called with subprocess (for example diff) I have figured out that all is working fine if stdin is closed but flushing stdin will cause a hang (the same as nothing would be done). In the attachments is a testca