当前位置: 技术问答>linux和unix
如何编程使linux重启???
来源: 互联网 发布时间:2015-02-06
本文导语: system("reboot")除外 | 那也很简单,你学习过内核编程吗?不要忘记这个函数 sys_reboot 他可以实现你要的功能。 系统调用 sys_reboot 还可以实现其他很强的功能 | LINUX: NAME reboot - rebo...
system("reboot")除外
|
那也很简单,你学习过内核编程吗?不要忘记这个函数
sys_reboot 他可以实现你要的功能。
系统调用 sys_reboot 还可以实现其他很强的功能
sys_reboot 他可以实现你要的功能。
系统调用 sys_reboot 还可以实现其他很强的功能
|
LINUX:
NAME
reboot - reboot or enable/disable Ctrl-Alt-Del
SYNOPSIS
For libc4 and libc5 the library call and the system call are identical, and since kernel version 2.1.30 there
are symbolic names LINUX_REBOOT_* for the constants and a fourth argument to the call:
#include
#include
int reboot (int magic, int magic2, int flag, void *arg);
Under glibc some of the constants involved have gotten symbolic names RB_*, and the library call is a 1-argu?
ment wrapper around the 3-argument system call:
#include
#include
int reboot (int flag);
FREEBSD:
#include
#include
int
reboot(int howto);
DESCRIPTION
Reboot() reboots the system. Only the super-user may reboot a machine on
demand. However, a reboot is invoked automatically in the event of unre-
coverable system failures.
NAME
reboot - reboot or enable/disable Ctrl-Alt-Del
SYNOPSIS
For libc4 and libc5 the library call and the system call are identical, and since kernel version 2.1.30 there
are symbolic names LINUX_REBOOT_* for the constants and a fourth argument to the call:
#include
#include
int reboot (int magic, int magic2, int flag, void *arg);
Under glibc some of the constants involved have gotten symbolic names RB_*, and the library call is a 1-argu?
ment wrapper around the 3-argument system call:
#include
#include
int reboot (int flag);
FREEBSD:
#include
#include
int
reboot(int howto);
DESCRIPTION
Reboot() reboots the system. Only the super-user may reboot a machine on
demand. However, a reboot is invoked automatically in the event of unre-
coverable system failures.