Skip to content

Commit 71b7d96

Browse files
committed
Ignore ignored signals
1 parent 134f83d commit 71b7d96

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

trepan/lib/sighandler.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# Copyright (C) 2009, 2013-2014, 2016 Rocky Bernstein <rocky@gnu.org>
2+
# Copyright (C) 2009, 2013-2014, 2016, 2022 Rocky Bernstein <rocky@gnu.org>
33
#
44
# This program is free software: you can redistribute it and/or modify
55
# it under the terms of the GNU General Public License as published by
@@ -264,10 +264,11 @@ def set_signal_replacement(self, signum, handle):
264264
return False
265265
# Since the intent is to set a handler, we should pass this
266266
# signal on to the handler
267-
self.sigs[signame].pass_along = True
268-
if self.check_and_adjust_sighandler(signame, self.sigs):
269-
self.sigs[signame].old_handler = handle
270-
return True
267+
if signame not in self.ignore_list:
268+
self.sigs[signame].pass_along = True
269+
if self.check_and_adjust_sighandler(signame, self.sigs):
270+
self.sigs[signame].old_handler = handle
271+
return True
271272
return False
272273

273274
def check_and_adjust_sighandler(self, signame, sigs):

0 commit comments

Comments
 (0)