[systemd-devel] issuing 'reboot' command does not print the familiar 'Restarting system.' message

Daniel Mack daniel at zonque.org
Fri Apr 10 01:13:45 PDT 2015


On 04/10/2015 04:18 AM, Ani Sinha wrote:
> OK I have one more question. Does every call path in the reboot
> command use the Linux reboot() sys call? I'm not familiar with dbus
> stuff but looking at the code seems to indicate that there might be
> some paths where reboot() is not issued. Just wanted to run by you
> guys since you guys know the code best.

The reboot command is symlinked to systemctl, which is a multi-call
binary. When invoked as 'reboot', 'shutdown', 'halt', 'poweroff' etc, it
communicates with PID1 and tells it to start one of the shutdown
targets. This way, the system will shut down and stop services in a
clean way. Once the target is reached, the reboot() syscall is issued to
the kernel.

If you want to omit that, and just tell the kernel to shutdown
immediately without talking to PID 1, use the -f switch of the reboot
commands.


Daniel


More information about the systemd-devel mailing list