mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 10:14:52 +00:00
kdrive/linux: Use OsSignal to set SIGUSR1 handler
Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
committed by
Enrico Weigelt
parent
e2c99a2e93
commit
489ba91f4b
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user