Changeset: 073b68dc838b for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=073b68dc838b
Modified Files:
        testing/src/process.py
Branch: Oct2010
Log Message:

Avoid deadlock.
This should fix bug 2699.
The deadlock happens especially on Windows where pipe buffers are
really small.  The server was hanging on writing to stderr and hence
not reading from stdin where we sent a command that was supposed to
produce output on stdout, which we were attempting to read.


diffs (19 lines):

diff -r 027653e1c8eb -r 073b68dc838b testing/src/process.py
--- a/testing/src/process.py    Tue Oct 26 14:32:42 2010 +0200
+++ b/testing/src/process.py    Tue Oct 26 17:03:14 2010 +0200
@@ -417,6 +417,8 @@
               shell = False,
               universal_newlines = True,
               bufsize = bufsize)
+    if stderr == PIPE:
+        p.stderr = _BufferedPipe(p.stderr)
     if stdout == PIPE:
         if stdin == PIPE:
             # If both stdin and stdout are pipes, we wait until the
@@ -434,6 +436,4 @@
             p.stdout._waitfor()
         else:
             p.stdout = _BufferedPipe(p.stdout)
-    if stderr == PIPE:
-        p.stderr = _BufferedPipe(p.stderr)
     return p
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to