From 489ba91f4b7cb5418d2a83d4a192cd1180809776 Mon Sep 17 00:00:00 2001 From: stefan11111 Date: Fri, 2 Jan 2026 16:03:38 +0200 Subject: [PATCH] kdrive/linux: Use OsSignal to set SIGUSR1 handler Signed-off-by: stefan11111 --- hw/kdrive/linux/linux.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index 1a2f4cab0b..c7e29aa274 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -137,7 +137,6 @@ LinuxInit(void) static void LinuxSetSwitchMode(int mode) { - struct sigaction act; struct vt_mode VT; if (ioctl(LinuxConsoleFd, VT_GETMODE, &VT) < 0) { @@ -145,20 +144,14 @@ LinuxSetSwitchMode(int mode) } if (mode == VT_PROCESS) { - act.sa_handler = LinuxVTRequest; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGUSR1, &act, 0); + OsSignal(SIGUSR1, LinuxVTRequest); VT.mode = mode; VT.relsig = SIGUSR1; VT.acqsig = SIGUSR1; } else { - act.sa_handler = SIG_IGN; - sigemptyset(&act.sa_mask); - act.sa_flags = 0; - sigaction(SIGUSR1, &act, 0); + OsSignal(SIGUSR1, SIG_IGN); VT.mode = mode; VT.relsig = 0;