REBOOT(3C) | Standard C Library Functions | REBOOT(3C) |
reboot - reboot system or halt processor
#include <sys/reboot.h> int reboot(int howto, char *bootargs);
The reboot() function reboots the system. The howto argument specifies the behavior of the system while rebooting and is a mask constructed by a bitwise-inclusive-OR of flags from the following list:
RB_AUTOBOOT
RB_HALT
RB_ASKNAME
RB_DUMP
Any other howto argument causes the kernel file to boot.
The interpretation of the bootargs argument is platform-dependent.
Upon successful completion, reboot() never returns. Otherwise, −1 is returned and errno is set to indicate the error.
The reboot() function will fail if:
EPERM
uadmin(2), Intro(8), boot(8), dumpadm(8), halt(8), init(8), kernel(8), reboot(8)
March 22, 2004 | OmniOS |