diff options
Diffstat (limited to 'src/home/media/record.py')
-rw-r--r-- | src/home/media/record.py | 8 |
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() |