Add proposed patch to not ignore EINTR when activating

epel9
Neal Gompa 3 years ago
parent 91ed5aeafc
commit b2f696ae6e

@ -0,0 +1,43 @@
From 704e4ce6c334dcf5db1fe9af22eabd335cebb775 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Fri, 25 Feb 2022 03:02:40 +0100
Subject: [PATCH] VirtualTerminal: do not ignore EINTR when activating
EINTR can be called at any time when a signal is received but here we
still need to follow through with both ioctl() calls.
This change is inspired by how xserver does more or less the same thing.
---
src/common/VirtualTerminal.cpp | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/common/VirtualTerminal.cpp b/src/common/VirtualTerminal.cpp
index e1330af..7791caf 100644
--- a/src/common/VirtualTerminal.cpp
+++ b/src/common/VirtualTerminal.cpp
@@ -211,10 +211,19 @@ out:
if (!vt_auto)
handleVtSwitches(fd);
- if (ioctl(fd, VT_ACTIVATE, vt) < 0)
+ int ret;
+ while ((ret = ioctl(fd, VT_ACTIVATE, vt) < 0) && errno == EINTR)
+ {}
+
+ if (ret < 0)
qWarning("Couldn't initiate jump to VT %d: %s", vt, strerror(errno));
- else if (ioctl(fd, VT_WAITACTIVE, vt) < 0)
- qWarning("Couldn't finalize jump to VT %d: %s", vt, strerror(errno));
+ else {
+ while ((ret = ioctl(fd, VT_WAITACTIVE, vt) < 0) && errno == EINTR)
+ {}
+
+ if (ret < 0)
+ qWarning("Couldn't finalize jump to VT %d: %s", vt, strerror(errno));
+ }
close(activeVtFd);
if (vtFd != -1)
--
2.34.1

@ -20,7 +20,7 @@
Name: sddm Name: sddm
Version: 0.19.0%{?commitdate:^git%{commitdate}.%{shortcommit}} Version: 0.19.0%{?commitdate:^git%{commitdate}.%{shortcommit}}
Release: 1%{?dist} Release: 2%{?dist}
License: GPLv2+ License: GPLv2+
Summary: QML based desktop and login manager Summary: QML based desktop and login manager
@ -48,6 +48,10 @@ Patch10: sddm-0.20.0-allow-hiding-wayland-sessions.patch
# Submmited: https://github.com/sddm/sddm/pull/1494 # Submmited: https://github.com/sddm/sddm/pull/1494
Patch11: 0001-Delay-for-logind-and-fallback-to-seat0.patch Patch11: 0001-Delay-for-logind-and-fallback-to-seat0.patch
# VirtualTerminal: do not ignore EINTR when activating
# Submitted: https://github.com/sddm/sddm/pull/1521
Patch12: 0001-VirtualTerminal-do-not-ignore-EINTR-when-activating.patch
## downstream patches ## downstream patches
Patch101: sddm-0.20.0-fedora_config.patch Patch101: sddm-0.20.0-fedora_config.patch
@ -299,6 +303,9 @@ fi
%changelog %changelog
* Fri Feb 25 2022 Neal Gompa <ngompa@fedoraproject.org> - 0.19.0^git20220224.5ad9f19-2
- Add proposed patch to not ignore EINTR when activating
* Fri Feb 25 2022 Neal Gompa <ngompa@fedoraproject.org> - 0.19.0^git20220224.5ad9f19-1 * Fri Feb 25 2022 Neal Gompa <ngompa@fedoraproject.org> - 0.19.0^git20220224.5ad9f19-1
- Update to new snapshot release - Update to new snapshot release

Loading…
Cancel
Save