REBOOT(3C) Standard C Library Functions REBOOT(3C)
reboot - reboot system or halt processor
#include <sys/reboot.h> int reboot
, char *bootargs
function reboots the system. The howto
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
The machine is rebooted from the root filesystem on the
default boot device. This is the default behavior. See boot(8)
The processor is simply halted; no reboot takes place.
This option should be used with caution. RB_ASKNAME
Interpreted by the bootstrap program and kernel, causing
the user to be asked for pathnames during the bootstrap. RB_DUMP
The system is forced to panic immediately without any
further processing and a crash dump is written to the dump
device (see dumpadm(8)
) before rebooting.
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
returned and errno
is set to indicate the error.
function will fail if: EPERM
} privilege is not asserted in the effective
set of the calling process.
SEE ALSO uadmin(2)
March 22, 2004 REBOOT(3C)