Expand description
Restarting this machine, for host reboot.
The daemon decides when (once every running job has finished); this
module only knows how, on each system and for each account the service
may run as, and tries the ways in order until one is accepted. Which
commands are tried is a pure function (commands) so every system’s
choice is tested on every system, and the daemon takes a Rebooter so
that no test ever restarts the machine running it.
Structs§
- Reboot
Command - One way to ask the system for a restart.
- System
Rebooter - The real thing: runs
commandsfor this machine until one is accepted.
Traits§
- Rebooter
- Asks the system to restart.
Functions§
- abort_
commands - The commands that call off a restart
commandsasked for and the system has not begun:shutdown /awithin Windows’ delay,shutdown -cfor a scheduled Linux shutdown. macOS has none: an application that refuses to quit has already called its restart off. - commands
- The commands that restart
os, in the order they are tried, for a service running as an administrator (root, LocalSystem) or not.