Why doesnβt work poweroff?
, ββ init - 1. init systemd; , poweroff systemctl.
systemd , init=/path/to/program. poweroff : systemctl systemd, .
systemd.
reboot Linux. glibc RB_POWER_OFF .
, reboot sync, .
glibc Linux:
#include <unistd.h>
#include <sys/reboot.h>
sync();
reboot(RB_POWER_OFF);
.
Linux ++?