[PATCH] Do not treat EINTR as a fatal error.
Žilvinas Valinskas
zilvinas.valinskas at gmail.com
Tue Apr 12 00:32:30 PDT 2011
Reinstates lost changes by d23c46dd3e2cbf84012055bad43b1bb15809a244 commit.
Call ioctl(VT_WAITACTIVE) fails with EINTR if call is interrupted by a signal
and it must be retried instead of failing hard.
https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/441653
Signed-off-by: Žilvinas Valinskas <zilvinas.valinskas at gmail.com>
---
hw/xfree86/os-support/linux/lnx_init.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c
index 9c71a42..2b645d1 100644
--- a/hw/xfree86/os-support/linux/lnx_init.c
+++ b/hw/xfree86/os-support/linux/lnx_init.c
@@ -62,10 +62,14 @@ drain_console(int fd, void *closure)
static void
switch_to(int vt, const char *from)
{
- if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt) < 0)
+ int result;
+
+ SYSCALL(result = ioctl(xf86Info.consoleFd, VT_ACTIVATE, vt));
+ if (result < 0)
FatalError("%s: VT_ACTIVATE failed: %s\n", from, strerror(errno));
- if (ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt) < 0)
+ SYSCALL(result = ioctl(xf86Info.consoleFd, VT_WAITACTIVE, vt));
+ if (result < 0)
FatalError("%s: VT_WAITACTIVE failed: %s\n", from, strerror(errno));
}
--
1.7.4.1.26.g00e6e
More information about the xorg-devel
mailing list