Commit 1cd89417 authored by Alan Coopersmith's avatar Alan Coopersmith

Always use server-<display>.xkm to avoid races when multiple servers start

Previously each server starting ran xkbcomp with the output set to
<keymapname>.xkm, read it, then deleted it - which led to races if
two servers were starting at the same time with the same keymap.

Sun bug #6773816 Xorg uses the same xkm output file for compiled keymap file
parent 1e4412ab
......@@ -192,16 +192,8 @@ char *buf = NULL, keymap[PATH_MAX],xkm_output_dir[PATH_MAX];
#ifdef WIN32
char tmpname[PATH_MAX];
if ((names->keymap==NULL)||(names->keymap[0]=='\0')) {
else {
if (strlen(names->keymap) > PATH_MAX - 1) {
ErrorF("[xkb] name of keymap (%s) exceeds max length\n", names->keymap);
return False;
snprintf(keymap, sizeof(keymap), "server-%s", display);
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment