[webkit-reviews] review denied: [Bug 64669] [Gtk] [NRWT] Xvfb produces a lot of stderr output : [Attachment 101116] Redirect Xvfb stderr output to a subprocess PIPE

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jul 18 14:14:41 PDT 2011


Philippe Normand <pnormand at igalia.com> has denied Zan Dobersek
<zandobersek at gmail.com>'s request for review:
Bug 64669: [Gtk] [NRWT] Xvfb produces a lot of stderr output
https://bugs.webkit.org/show_bug.cgi?id=64669

Attachment 101116: Redirect Xvfb stderr output to a subprocess PIPE
https://bugs.webkit.org/attachment.cgi?id=101116&action=review

------- Additional Comments from Philippe Normand <pnormand at igalia.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=101116&action=review


> Tools/Scripts/webkitpy/layout_tests/port/gtk.py:46
> +	   self._xvfb_process = subprocess.Popen(run_xvfb,
stderr=subprocess.PIPE)

http://stackoverflow.com/questions/699325/suppress-output-in-python-calls-to-ex
ecutables

recommends to open /dev/null instead.

Quoting the interesting comment:

"""
If your search engine lead you to this old question (like me), be aware that
Manuel's solution (at this time the most valued), namely using PIPE can lead to
deadlocks.

Indeed, because pipes are buffered, you can write a certain number of bytes in
a pipe, even if no one read it. However the size of buffer is finite. And
consequently if your program A has an output larger than the buffer, A will be
blocked on writing, while the calling program B awaits the termination of A.
"""

So the preferred solution would be something like:

devnull = open(os.devnull, 'w')
self._xvfb_process = subprocess.Popen(run_xvfb, stderr=devnull)
devnull.close()

Can you please check this would work?
Thanks!


More information about the webkit-reviews mailing list