NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO
#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 can assume one of the following values:
The machine is rebooted from the root filesystem on the default boot device. This is the default behavior. See boot(1M) and kernel(1M).
the processor is simply halted; no reboot takes place. This option should be used with caution.
Interpreted by the bootstrap program and kernel, causing the user to be asked for pathnames during the bootstrap.
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.
Only the super-user may reboot() a machine.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO