From 75fe336b6c903133ae386f5cb8d308a0e9e2768e Mon Sep 17 00:00:00 2001 From: Michel Hummel Date: Fri, 6 Aug 2010 15:23:52 +0100 Subject: [PATCH] hw/xwin: Mitigate a race condition in clipboard thread initialization Remove the variables g_fClipboardLaunched and g_fClipboardStarted from winInitializeGlobals(), as their re-initialization is handled in the file hw/xwin/InitOutput.c. Re-initializing g_fClipboardLaunched and g_fClipboardStarted during the server reset procedure can lead to the clipboard thread being launched two times and sometimes leads to a crash of the X server... Reviewed-by: Jon TURNEY Reviewed-by: Colin Harrison --- hw/xwin/winglobals.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/xwin/winglobals.c b/hw/xwin/winglobals.c index 631f12e21..655cdb131 100644 --- a/hw/xwin/winglobals.c +++ b/hw/xwin/winglobals.c @@ -114,8 +114,6 @@ winInitializeGlobals (void) { g_dwCurrentThreadID = GetCurrentThreadId (); #ifdef XWIN_CLIPBOARD - g_fClipboardLaunched = FALSE; - g_fClipboardStarted = FALSE; g_iClipboardWindow = None; g_pClipboardDisplay = NULL; g_atomLastOwnedSelection = None;