aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/python/lib/gdb/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py
index 98aadb1..b312436 100644
--- a/gdb/python/lib/gdb/__init__.py
+++ b/gdb/python/lib/gdb/__init__.py
@@ -271,11 +271,11 @@ def blocked_signals():
return
to_block = {signal.SIGCHLD, signal.SIGINT, signal.SIGALRM, signal.SIGWINCH}
- signal.pthread_sigmask(signal.SIG_BLOCK, to_block)
+ old_mask = signal.pthread_sigmask(signal.SIG_BLOCK, to_block)
try:
yield None
finally:
- signal.pthread_sigmask(signal.SIG_UNBLOCK, to_block)
+ signal.pthread_sigmask(signal.SIG_SETMASK, old_mask)
class Thread(threading.Thread):