Terminate ddrescue directly instead
This commit is contained in:
parent
8f14fd2442
commit
6a1cf98d0b
1 changed files with 2 additions and 2 deletions
|
|
@ -1976,7 +1976,7 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True) -> None:
|
||||||
warning_message = check_destination_health(state.destination)
|
warning_message = check_destination_health(state.destination)
|
||||||
if warning_message:
|
if warning_message:
|
||||||
# Error detected on destination, stop recovery
|
# Error detected on destination, stop recovery
|
||||||
exe.stop_process(proc)
|
proc.terminate()
|
||||||
cli.print_error(warning_message)
|
cli.print_error(warning_message)
|
||||||
break
|
break
|
||||||
_i += 1
|
_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')
|
LOG.warning('ddrescue stopped by user')
|
||||||
warning_message = 'Aborted'
|
warning_message = 'Aborted'
|
||||||
std.sleep(2)
|
std.sleep(2)
|
||||||
exe.stop_process(proc, graceful=False)
|
proc.terminate()
|
||||||
break
|
break
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
# Continue to next loop to update panes
|
# Continue to next loop to update panes
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue