Skip to main content

Module reboot

Module reboot 

Source
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§

RebootCommand
One way to ask the system for a restart.
SystemRebooter
The real thing: runs commands for this machine until one is accepted.

Traits§

Rebooter
Asks the system to restart.

Functions§

abort_commands
The commands that call off a restart commands asked for and the system has not begun: shutdown /a within Windows’ delay, shutdown -c for 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.