summaryrefslogtreecommitdiff
path: root/src/home/media/record.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/home/media/record.py')
-rw-r--r--src/home/media/record.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/home/media/record.py b/src/home/media/record.py
index d2f9b0e..fdb8382 100644
--- a/src/home/media/record.py
+++ b/src/home/media/record.py
@@ -214,8 +214,12 @@ class Recording:
try:
self.process.wait(timeout=timeout)
except subprocess.TimeoutExpired:
- self.logger.warning(f'stop: wait({timeout}): timeout expired, calling terminate()')
- self.process.terminate()
+ self.logger.warning(f'stop: wait({timeout}): timeout expired, killing it')
+ try:
+ os.kill(self.recorder_program_pid, signal.SIGKILL)
+ self.process.terminate()
+ except Exception as exc:
+ self.logger.exception(exc)
else:
self.logger.warning(f'stop: pid of {self.RECORDER_PROGRAM} is unknown, calling terminate()')
self.process.terminate()