summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Srb <msrb@suse.com>2017-11-27 09:59:01 +0100
committerAdam Jackson <ajax@redhat.com>2018-02-12 14:50:17 -0500
commit9cd243f75dc52e1c649178963ab22583db52cd54 (patch)
treed9183f07531365dd50a1c1a4d79a9761f541c838
parent5c456b6e2a9a579e67ba577f9147642406f2ce99 (diff)
os/inputthread: Force unlock when stopping thread.
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. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=103782 Signed-off-by: Michal Srb <msrb@suse.com> Reviewed-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 71348e99a8e6a95542e483b93839168ca8f51f81)
-rw-r--r--os/inputthread.c1
1 files changed, 1 insertions, 0 deletions
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) {