[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH] os/inputthread: Force unlock when stopping thread.
From: Michal Srb <msrb () suse ! com>
Date: 2017-10-27 9:20:46
Message-ID: 20171027092046.16496-1-msrb () suse ! com
[Download RAW message or body]
The inputthread is kept locked all the time while X server's VT is not active.
If the X server is terminated while not active, it will be stuck forever in
InputThreadFini waiting for the thread to join, but it wouldn't because it is
locked.
---
This fixes the X server termination while its VT is not active. I think it
should be safe to force unlock it from InputThreadFini - X server is
terminating and nothing else should race there, but I am not completely sure.
os/inputthread.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/os/inputthread.c b/os/inputthread.c
index 721e86312..dc4eb9f20 100644
--- a/os/inputthread.c
+++ b/os/inputthread.c
@@ -497,6 +497,7 @@ InputThreadFini(void)
/* Close the pipe to get the input thread to shut down */
close(hotplugPipeWrite);
+ input_force_unlock();
pthread_join(inputThreadInfo->thread, NULL);
xorg_list_for_each_entry_safe(dev, next, &inputThreadInfo->devs, node) {
--
2.12.3
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic