mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 12:23:53 +08:00
use HARDWARE.reboot() when unkillable process doesnt stop
old-commit-hash: 3289de0aa3
This commit is contained in:
@@ -371,11 +371,8 @@ def kill_managed_process(name):
|
||||
join_process(running[name], 15)
|
||||
if running[name].exitcode is None:
|
||||
cloudlog.critical("unkillable process %s failed to die!" % name)
|
||||
# TODO: Use method from HARDWARE
|
||||
if ANDROID:
|
||||
cloudlog.critical("FORCE REBOOTING PHONE!")
|
||||
os.system("date >> /sdcard/unkillable_reboot")
|
||||
os.system("reboot")
|
||||
os.system("date >> /sdcard/unkillable_reboot")
|
||||
HARDWARE.reboot()
|
||||
raise RuntimeError
|
||||
else:
|
||||
cloudlog.info("killing %s with SIGKILL" % name)
|
||||
|
||||
Reference in New Issue
Block a user