Closed ionelmc closed 4 years ago
Concurrency is solved.
From latest README:
"Recent X servers as of version 1.13 (Xvfb, too) support the -displayfd command line option: It will make the X server choose the display itself" https://stackoverflow.com/questions/2520704/find-a-free-x11-display-number/
First help text is checked (e.g. Xvfb -help
) to find if -displayfd
flag is available.
If -displayfd
flag is available then it is used, if not then there are 10 retries by default which should be enough for starting 10 concurrent X servers.
The retries
parameter can be increased if necessary.
Currently there's the
RANDOMIZE_DISPLAY_NR
users can patch to get better concurrent behavior but it's contrived to use.Could we have a better API for this? Or maybe an atomic "get number and lock file"?