From 6a1cf98d0bc1b58c3288e50f82b86d28d1acbbc4 Mon Sep 17 00:00:00 2001 From: 2Shirt <2xShirt@gmail.com> Date: Sat, 8 Jul 2023 18:10:14 -0700 Subject: [PATCH] Terminate ddrescue directly instead --- scripts/wk/clone/ddrescue.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/wk/clone/ddrescue.py b/scripts/wk/clone/ddrescue.py index 6e6f9568..abfd0d6b 100644 --- a/scripts/wk/clone/ddrescue.py +++ b/scripts/wk/clone/ddrescue.py @@ -1976,7 +1976,7 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True) -> None: warning_message = check_destination_health(state.destination) if warning_message: # Error detected on destination, stop recovery - exe.stop_process(proc) + proc.terminate() cli.print_error(warning_message) break _i += 1 @@ -1994,7 +1994,7 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True) -> None: LOG.warning('ddrescue stopped by user') warning_message = 'Aborted' std.sleep(2) - exe.stop_process(proc, graceful=False) + proc.terminate() break except subprocess.TimeoutExpired: # Continue to next loop to update panes