Skip to content

Commit c4e240d

Browse files
committed
Popen: fixed progmon's cancel operation (ctrl-c)
1 parent 7d95ec0 commit c4e240d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/ffmpegio/ffmpegprocess.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@
2020
"""
2121

2222
from collections import abc
23-
from os import path
23+
from os import path, name as os_name
2424
from threading import Thread
2525
import subprocess as sp
2626
from copy import deepcopy
2727
from tempfile import TemporaryDirectory
2828
import logging
29+
import signal
2930

3031
logger = logging.getLogger("ffmpegio")
3132

@@ -301,7 +302,7 @@ def __init__(
301302

302303
# set progress monitor's cancelfun to allow its callback to terminate the FFmpeg process
303304
if self._progmon:
304-
self._progmon.cancelfun = self.terminate
305+
self._progmon.cancelfun = self.send_signal
305306
self._progmon.start()
306307

307308
# start the process monitor to perform the cleanup when FFmpeg terminates

0 commit comments

Comments
 (0)