[plasma/plasma-login-manager] src: Revert "VirtualTerminal: take over stale VT_PROCESS handler and ignore VT switch..."
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 20935f7ca78f004660b2d7a46e2137f3cec9c772 by David Edmundson.
Committed on 29/07/2026 at 23:12.
Pushed by davidedmundson into branch 'master'.
Revert "VirtualTerminal: take over stale VT_PROCESS handler and ignore VT switch..."
This reverts commit a05fadfb95e229c69e96122bbc9be98ab849d69f
M +0 -19 src/common/VirtualTerminal.cpp
M +0 -1 src/common/VirtualTerminal.h
M +0 -3 src/helper/UserSession.cpp
https://invent.kde.org/plasma/plasma-login-manager/-/commit/20935f7ca78f004660b2d7a46e2137f3cec9c772
diff --git a/src/common/VirtualTerminal.cpp b/src/common/VirtualTerminal.cpp
index 6c1e7737..9e25d5cb 100644
--- a/src/common/VirtualTerminal.cpp
+++ b/src/common/VirtualTerminal.cpp
@@ -109,17 +109,6 @@ static bool handleVtSwitches(int fd)
return ok;
}
-void ignoreVtSwitches()
-{
- // For callers that execve() while still the VT_PROCESS owner:
- // handled dispositions reset to SIG_DFL across exec, so a switch
- // request in the window before the new compositor takes VT control
- // would kill the process. SIG_IGN survives exec; the kernel defers
- // the switch until the compositor re-establishes VT handling.
- signal(RELEASE_DISPLAY_SIGNAL, SIG_IGN);
- signal(ACQUIRE_DISPLAY_SIGNAL, SIG_IGN);
-}
-
static void fixVtMode(int fd, bool vt_auto)
{
vt_mode getmodeReply{};
@@ -132,14 +121,6 @@ static void fixVtMode(int fd, bool vt_auto)
ok = false;
}
- // The previous VT_PROCESS owner (logind for Wayland greeters)
- // can clear its VT mode mid-switch, leaving VT_WAITACTIVE hung.
- // Take over so the relsig handshake completes locally.
- if (getmodeReply.mode == VT_PROCESS) {
- ok = handleVtSwitches(fd);
- modeFixed = true;
- }
-
if (getmodeReply.mode != VT_AUTO) {
goto out;
}
diff --git a/src/common/VirtualTerminal.h b/src/common/VirtualTerminal.h
index 09eb11b1..456884e7 100644
--- a/src/common/VirtualTerminal.h
+++ b/src/common/VirtualTerminal.h
@@ -47,7 +47,6 @@ int currentVt();
Terminal openVt(int vt);
Terminal setUpNewVt();
void jumpToVt(int vt, bool vt_auto);
-void ignoreVtSwitches();
}
}
diff --git a/src/helper/UserSession.cpp b/src/helper/UserSession.cpp
index 6f6c22f4..9d9609b7 100644
--- a/src/helper/UserSession.cpp
+++ b/src/helper/UserSession.cpp
@@ -146,9 +146,6 @@ void UserSession::childModifier()
if (vtNumber > 0) {
VirtualTerminal::jumpToVt(vtNumber, x11Session);
- // This process becomes the session via execve(); leave the VT
- // switch signals ignored so they survive the exec.
- VirtualTerminal::ignoreVtSwitches();
}
#ifdef Q_OS_LINUX