[issue15898] OSX TTY bug

2012-09-11 Thread Andrew Moffat
Andrew Moffat added the comment: Sorry about that, I refactored out the string at the last minute and typed "testing123" instead of the original "testing" from the trace. I'm not sure I follow the problem exactly. So you're saying that the failing version us

[issue15898] OSX TTY bug

2012-09-10 Thread Andrew Moffat
Andrew Moffat added the comment: Below I attached a script that reproduces the behavior of an assertion error on a specific fork condition for a process with a pty. Here are the results Xubuntu x64: Python 2.7, parent_close_slave_before_child_write = False: WORKS Python 2.7

[issue15898] OSX TTY bug

2012-09-10 Thread Andrew Moffat
Andrew Moffat added the comment: @Ned, Ok, give me a little time to work up those suggestions. On my machine, the previous script prints "testing" consistently on 2.7, "" consistently on 3.2. I guess this is the behavior that is unexpected...it should print the same thi

[issue15898] OSX TTY bug

2012-09-09 Thread Andrew Moffat
Andrew Moffat added the comment: If I move tcsetattr into the parent, the race condition still exists. If I move it into the child, before the write(), it works. My environment is OSX 10.7.2 inside of Virtualbox (maybe this is the problem?) I've shuffled some code around, and found case

[issue15898] OSX TTY bug

2012-09-09 Thread Andrew Moffat
New submission from Andrew Moffat: I'm getting some kind of race condition on OSX when trying to read the output from a pseudoterminal of a forked process. This race conditional only occurs if I run tty.tcsetattr on the master side of the pty, regardless of if I actually change the mo

[issue14000] Subprocess stdin.flush does not flush

2012-02-13 Thread Andrew Moffat
New submission from Andrew Moffat : The following code only works if the "p.stdin.close()" line is uncommented. It seems that stdin only flushes to the process on stdin.close(), not on stdin.flush(). --- import subprocess as subp import threading i