Hi! popen3() of the python (2.1.2) which comes with zope hangs on W2K: (stdin, stdout, stderr)=popen3('wvWare -x wvware.xml foo.doc') text=stdout.read() --> read never ends. It works if wvware produces few output, but with larger files it hangs (0% CPU usage). wvware is a binary from gnuwin32.sourceforge.net Platform: Windows 2000 SP2 Has someone seen this problem before? thomas
Thomas Guettler wrote:
Hi!
popen3() of the python (2.1.2) which comes with zope hangs on W2K:
(stdin, stdout, stderr)=popen3('wvWare -x wvware.xml foo.doc') text=stdout.read()
--> read never ends.
I found the problem. It is a race condition which might result in a deadlock. It only happens sometimes, so it is something programmers hate. (stdin, stdout, stderr)=popen3('foo_command') text=stdout.read() Imagine foo_command writes a lot to stderr. After some bytes the buffer is full. foo_commands blocks while writing to stderr. The application blocks while reading from stdout. ---> Dead lock. One solution would be to write stderr to a file and only read from stdout. An other explanation: http://mail.python.org/pipermail/python-dev/2000-September/009460.html This neither zope nor python specific. thomas
participants (1)
-
Thomas Guettler