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:
|
except KeyboardInterrupt:
|
||||||
# Wait a bit to let ddrescue exit safely
|
# Wait a bit to let ddrescue exit safely
|
||||||
warning_message = 'Aborted'
|
warning_message = 'Aborted'
|
||||||
proc.wait(timeout=10)
|
std.sleep(2)
|
||||||
proc.terminate()
|
exe.run_program(['sudo', 'killall', 'ddrescue'], check=False)
|
||||||
break
|
break
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
# Continue to next loop to update panes
|
# Continue to next loop to update panes
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
# Done
|
# Done
|
||||||
|
std.sleep(1)
|
||||||
break
|
break
|
||||||
|
|
||||||
# Update progress
|
# Update progress
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue