LINUX.ORG.RU

как реализована робота команд питания компютера

 ,


0

1

доброго времени суток господа. возник следующий вопрос а как в системах linux реализовано выключение? знаю што это как-то связано с init скриптом, но как это работает не знаю.

Ответ на: комментарий от Deleted

не совсем. про acpi я знаю. а о том как отдается команда ядру

old_unixoid
() автор топика

man 2 reboot?

anonymous
()
       Halt notes that the system is being brought down in the file /var/log/wtmp, and then either tells the
       kernel to halt, reboot or power-off the system.

       If halt or reboot is called when the system is not in runlevel 0 or 6, in other words when it's  run‐
       ning normally, shutdown will be invoked instead (with the -h or -r flag). For more info see the shut‐
       down(8) manpage.
       shutdown brings the system down in a secure way.  All logged-in users are notified that the system is
       going down, and login(1) is blocked.  It is possible to shut the system down immediately or  after  a
       specified  delay.   All  processes  are  first  notified  that the system is going down by the signal
       SIGTERM.  This gives programs like vi(1) the time to save the file being edited, mail and  news  pro‐
       cessing  programs  a  chance  to  exit  cleanly,  etc.   shutdown does its job by signalling the init
       process, asking it to change the runlevel.  Runlevel 0 is used to halt the system, runlevel 6 is used
       to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks
       can be performed; this is the default if neither the -h or -r flag is  given  to  shutdown.   To  see
       which actions are taken on halt or reboot see the appropriate entries for these runlevels in the file
       /etc/inittab.
saahriktu ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.