taniguchi 发表于 2020-9-7 11:52
When I unplug the power, I want to exit the python program and then achieve an OS shutdown.
But even use UPS, still you can't achieve this usecase...
The problem need 1 condition, which is you can get the trigger from software level.
So that you can exit your program and shutdown OS.
But if you unplug the power directly, no trigger can be received.
Usually the case is achieved by a power management unit.
Like you turn off power through a switch on this unit.
And the unit doesn't turn off power directly, it just send out a trigger first, through RS232 etc.
It will wait several seconds, and shutdown the system.
共 3 个关于本帖的回复 最后回复于 2020-9-11 15:42