reboot - reboot system or halt processor
int reboot(int howto, char *bootargs);
The reboot() function reboots the system. The howto argu-
ment specifies the behavior of the system while rebooting
and is a mask constructed by a bitwise-inclusive-OR of flags
from the following list:
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, caus-
ing the user to be asked for pathnames during the
The system is forced to panic immediately without any
further processing and a crash dump is written to the
dump device (see dumpadm(1M)) before rebooting.
Any other howto argument causes the kernel file to boot.
The interpretation of the bootargs argument is platform-
Upon successful completion, reboot() never returns. Other-
wise, -1 is returned and errno is set to indicate the error.
The reboot() function will fail if:
EPERM The caller is not the super-user.
Only the super-user may reboot() a machine.
intro(1M), boot(1M), dumpadm(1M), halt(1M), init(1M),
kernel(1M), reboot(1M), uadmin(2)
Man(1) output converted with