reboot - Reboots system or halts the system
int howto );
howto Specifies a mask of options.
The reboot() function restarts the system. The startup is automatic and
brings up /vmunix in the normal, nonmaintenance mode. The calling process
must have superuser privilege to run this function successfully. However, a
reboot is invoked automatically in the event of unrecoverable system
The following options, defined in the sys/reboot.h include file are passed
to the kernel bootstrap process. They are supplied as values to the howto
The default, causing the system to reboot in its usual fashion.
RB_DUMP Dump kernel memory before rebooting; see savecore(8) for more
RB_HALT The processor is simply halted; no reboot takes place.
RB_NOSYNC The disks are not sync'ed before the processor is halted or
rebooted. Normally, the disks are sync'ed before the processor
is halted or rebooted. See sync(8) for more information.
Because the disks are not sync'ed when you specify the RB_NOSYNC
option, loss of data may result from using it.
When no options are given (that is, RB_AUTOBOOT is used), the system is
rebooted from file vmunix in the root file system.
If successful, this call does not return. Otherwise, -1 is returned and
errno is set to indicate the error.
If the reboot() function fails, errno may be set to the following value:
[EPERM] The calling process does not have appropriate privilege.
Commands: crashdc(8), halt(8), reboot(8), savecore(8), sync(8)