Skip to content

Commit cd711de

Browse files
committed
Signal handling refactor
This is a removal of legacy code for signal handling. This signal handling was useful for the legacy runner where all tasks were running in child processes. But now when we use spawners for creating tasks each with different implementation, we need to handle the signal handling in the spawners itself. Signed-off-by: Jan Richter <jarichte@redhat.com>
1 parent ed1619a commit cd711de

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

avocado/core/app.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from avocado.core.output import STD_OUTPUT
2626
from avocado.core.parser import Parser
2727
from avocado.core.settings import settings
28-
from avocado.utils import process
2928

3029

3130
class AvocadoApp:
@@ -90,13 +89,6 @@ def _run_cli_plugins(self):
9089

9190
@staticmethod
9291
def _setup_signals():
93-
def sigterm_handler(signum, frame): # pylint: disable=W0613
94-
children = process.get_children_pids(os.getpid())
95-
for child in children:
96-
process.kill_process_tree(int(child))
97-
raise SystemExit("Terminated")
98-
99-
signal.signal(signal.SIGTERM, sigterm_handler)
10092
if hasattr(signal, "SIGTSTP"):
10193
signal.signal(signal.SIGTSTP, signal.SIG_IGN) # ignore ctrl+z
10294

0 commit comments

Comments
 (0)