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

Ani Sinha ani at arista.com
Fri Apr 10 08:40:38 PDT 2015


On Fri, Apr 10, 2015 at 1:13 AM, Daniel Mack <daniel at zonque.org> wrote:
> 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.

Can you please point me to the code and function call that processes
the 'reboot' target from PID 1?

thanks,
ani


More information about the systemd-devel mailing list