[Python-checkins] r80086 - python/trunk/Lib/test/test_os.py
brian.curtin at gmail.com
Thu Apr 15 17:58:21 CEST 2010
On Thu, Apr 15, 2010 at 09:04, Nick Coghlan <ncoghlan at gmail.com> wrote:
> brian.curtin wrote:
> > Because subprocess pipes
> > can't be read from until EOF and I want to read from them before that,
> > use ctypes to peek by using PeekNamedPipe.
> That's not true. You may need to write a line feed or otherwise flush
> the stream in the subprocess, but the parent process can definitely read
> data before the pipe is closed. We used to have problems with pipe
> buffers on Windows filling that were solved solely by creating a thread
> dedicated to clearing any received data out of the pipe.
That's what I thought as well (line feed and/or flush), but I was not able
to get that working at all. I opened issue #8405 last night for fixing this
test up since I've taken a few whacks at it and haven't gotten it 100% right
yet. It seems to be working for the time being but it's still susceptible to
failure, and I'd like to not use ctypes if possible.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-checkins