summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRummskartoffel <Rummskartoffel@protonmail.com>2022-01-28 15:13:23 +0100
committerAndreas Kling <kling@serenityos.org>2022-01-29 11:22:43 +0100
commita92719fc72f1f7cbcd948f49d6db5b128db5b61d (patch)
tree71b12e3e184d932a776020262e93a904291ef90b
parent335183d0e9f7839ea5f28af8e225036977952cf2 (diff)
downloadserenity-a92719fc72f1f7cbcd948f49d6db5b128db5b61d.zip
UserspaceEmulator: Implement signal masking
-rw-r--r--Userland/DevTools/UserspaceEmulator/Emulator.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
index 3cb1e04e5d..810b563f3e 100644
--- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp
+++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp
@@ -593,6 +593,9 @@ void Emulator::dispatch_one_pending_signal()
VERIFY(signum != -1);
m_pending_signals &= ~(1 << signum);
+ if (((1 << (signum - 1)) & m_signal_mask) != 0)
+ return;
+
auto& handler = m_signal_handler[signum];
if (handler.handler == 0) {