]> git.pld-linux.org Git - packages/X11.git/blame - X11-acpi_event_loop_fix.patch
- orphaned, outdated
[packages/X11.git] / X11-acpi_event_loop_fix.patch
CommitLineData
10cdb5dc
AM
1This fixes issues with the server choking when it's listening to acpid and
2acpid is shut down. See https://bugs.freedesktop.org/show_bug.cgi?id=5140
3and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=345537.
4
5This patch by Mattia Dongili.
6
7Index: xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c
8===================================================================
9RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c,v
10retrieving revision 1.2
11diff -u -r1.2 lnx_acpi.c
12--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c 31 Oct 2005 05:45:40 -0000 1.2
13+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_acpi.c 2 Jan 2006 17:17:29 -0000
14@@ -45,6 +45,13 @@
15 memset(ev, 0, LINE_LENGTH);
16
17 n = read( fd, ev, LINE_LENGTH );
18+ if (n <= 0) {
19+ /* can only happen when reading from acpid socket */
20+ xf86MsgVerb(X_WARNING,3,"ACPI Event handler disappeared, reopening.\n");
21+ lnxCloseACPI();
22+ lnxACPIOpen();
23+ return 0;
24+ }
25
26 /* Check that we have a video event */
27 if (strstr(ev, "video") == ev) {
28@@ -160,6 +167,9 @@
29 #ifdef DEBUG
30 ErrorF("ACPI: Closing device\n");
31 #endif
32+ xf86PMGetEventFromOs = NULL;
33+ xf86PMConfirmEventToOs = NULL;
34+
35 if (ACPIihPtr) {
36 fd = xf86RemoveInputHandler(ACPIihPtr);
37 shutdown(fd, 2);
This page took 0.027698 seconds and 4 git commands to generate.