Closed amagee closed 8 years ago
Bah, never mind, you've already fixed this.
This is still broken for me: I have a xvfbwrapper
with another TMPDIR than the Xvfb tmpdir, so each Xvfb instance are string with display number 1 and only the first succeed.
Something seems to have changed when I upgraded from Ubuntu 15.10 with Python 3.4 to Ubuntu 16.04 with Python 3.5. Everything used to work fine, but now the
_get_next_unused_display
method fails to find the lock files in the right place and as a resultxvfbwrapper
will try to open multipleXvfb
instances on the same port when run in parallel.The problem seems to be that
tempfile.gettempdir
cannot be relied on to return the same directory thatXvfb
actually uses. In my case, the actual log files exist in/tmp
, buttempfile.gettempdir()
returns/tmp/amagee
. I am able to fix the problem by changingto
but obviously this is not a portable solution and I'm not sure what would be.
The docs for
tempfile.gettempdir
(https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir) say:And my
TMPDIR
environment variable is indeed/tmp/amagee
.