Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Unified Diff: infra/scripts/legacy/scripts/slave/xvfb.py

Issue 2216543002: xvfb: improve robustness when stale lock files exist (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/scripts/legacy/scripts/slave/xvfb.py
diff --git a/infra/scripts/legacy/scripts/slave/xvfb.py b/infra/scripts/legacy/scripts/slave/xvfb.py
index f5f357764358527eb361fc23bf2d2f1b026f9a29..051413aa3d22203603f37919f2219e215965497c 100644
--- a/infra/scripts/legacy/scripts/slave/xvfb.py
+++ b/infra/scripts/legacy/scripts/slave/xvfb.py
@@ -60,6 +60,14 @@ def StartVirtualX(slave_build_name, build_dir, with_wm=True, server_dir=None):
print 'xdisplaycheck says there is a display still running, exiting...'
raise Exception('Display already present.')
+ xvfb_lock_filename = '/tmp/.X%s-lock' % _XvfbDisplayIndex(slave_build_name)
+ if os.path.exists(xvfb_lock_filename):
+ print 'Removing stale xvfb lock file %r' % xvfb_lock_filename
+ try:
+ os.unlink(xvfb_lock_filename)
+ except OSError as e:
+ print 'Removing xvfb lock file failed: %s' % e
+
# Figure out which X server to try.
cmd = 'Xvfb'
if server_dir and os.path.exists(server_dir):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698