[PATCH] Always use server-<display>.xkm for xkbcomp output files

Alan Coopersmith Alan.Coopersmith at Sun.COM
Wed Nov 19 14:04:57 PST 2008


The attached patch is code we've used in Xsun for years, and our Sun Ray
people recently hit the same issue again in their Xorg 1.2-based Xnewt
server port.   It simply changes the Xserver to always use a filename
containing the display number for xkm output, so that if two servers are
starting at once with the same keymap they don't overwrite or delete
each other's xkm files.    While we're probably more likely to hit this
on Sun Ray servers which can have hundreds of X servers running, I think
it could also hit a single user machine with :0 & :1 starting on different
vt's at the same time.

(Of course, the oft-mentioned change of not forking xkbcomp to compile to
 xkm would also solve this, but this is a much simpler short-term fix.)

Does this look good to everyone?   Anyone know of a reason it would not
be a good idea?

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Always-use-server-display-.xkm-to-avoid-races-when.patch
URL: <http://lists.x.org/archives/xorg/attachments/20081119/8156a57f/attachment.ksh>


More information about the xorg mailing list