From df97833efc40691bc334966d3d3e38a959749d43 Mon Sep 17 00:00:00 2001 From: iMoD1998 <16210252+iMoD1998@users.noreply.github.com> Date: Mon, 9 Nov 2026 00:48:48 +0000 Subject: [PATCH] Fix rt_sigprocmask EINVAL --- qiling/os/posix/syscall/signal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qiling/os/posix/syscall/signal.py b/qiling/os/posix/syscall/signal.py index 1591cb558..30ffd033f 100644 --- a/qiling/os/posix/syscall/signal.py +++ b/qiling/os/posix/syscall/signal.py @@ -10,7 +10,7 @@ from qiling.const import QL_ARCH from qiling.os import struct -from qiling.os.posix.const import NSIG +from qiling.os.posix.const import EINVAL, NSIG # TODO: MIPS differs in too many details around signals; MIPS implementation is better extracted out @@ -161,7 +161,7 @@ def __sigprocmask(ql: Qiling, how: int, newset: int, oldset: int): ql.os.blocked_signals = set_mask else: - return -1 # EINVAL + return -EINVAL # silently drop attempts to block SIGKILL and SIGSTOP ql.os.blocked_signals &= ~((1 << SIGKILL) | (1 << SIGSTOP))