Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions riotctrl/ctrl.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import abc
import os
import time
import signal
import logging
import subprocess
import contextlib
Expand Down Expand Up @@ -179,7 +180,14 @@ def stop_term(self):

Handles possible exceptions.
"""
if self._term_pid() is None:
return

try:
# Native will spawn more than one process, so send the signals
# to the process group instead of the process.
os.killpg(self._term_pid(), signal.SIGHUP)
os.killpg(self._term_pid(), signal.SIGINT)
self.term.close()
except AttributeError:
# Not initialized
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ markers =
[pylint]
reports = no
max-line-length = 88
max-positional-arguments = 6
disable = locally-disabled,consider-using-f-string,invalid-name,too-few-public-methods
msg-template = {path}:{line}: [{msg_id}({symbol}), {obj}] {msg}

Expand Down