Avoid crash while stopping ddrescue
* Killall is needed because of sudo
This commit is contained in:
parent
2b18da7244
commit
4f2b31c705
1 changed files with 3 additions and 2 deletions
|
|
@ -1675,14 +1675,15 @@ def run_ddrescue(state, block_pair, pass_name, settings, dry_run=True):
|
|||
except KeyboardInterrupt:
|
||||
# Wait a bit to let ddrescue exit safely
|
||||
warning_message = 'Aborted'
|
||||
proc.wait(timeout=10)
|
||||
proc.terminate()
|
||||
std.sleep(2)
|
||||
exe.run_program(['sudo', 'killall', 'ddrescue'], check=False)
|
||||
break
|
||||
except subprocess.TimeoutExpired:
|
||||
# Continue to next loop to update panes
|
||||
pass
|
||||
else:
|
||||
# Done
|
||||
std.sleep(1)
|
||||
break
|
||||
|
||||
# Update progress
|
||||
|
|
|
|||
Loading…
Reference in a new issue