reboot(3C)
NAME
reboot − reboot system or halt processor
SYNOPSIS
#include <sys/reboot.h>
int reboot(int howto, char ∗bootargs);
DESCRIPTION
reboot() reboots the system. howto is an option passed to specify the behaviour of the system while rebooting. The function interface permits only one of RB_HALT, RB_ASKNAME or RB_AUTOBOOT to be passed. RB_AUTOBOOT is the default.
The howto options are:
RE_AUTOBOOT
The machine is rebooted from the root filesystem on the default boot device. See boot(1M) and kernel(1M).
RB_HALT the processor is simply halted; no reboot takes place. RB_HALT 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.
The interpretation of the bootargs argument is platform dependent.
RETURN VALUES
If successful, this call never returns. Otherwise, a −1 is returned and an error is returned in the global variable errno.
ERRORS
EPERM The caller is not the super-user.
SEE ALSO
intro(1M), boot(1M), halt(1M), init(1M), kernel(1M), reboot(1M), uadmin(2)
NOTES
Any other howto argument causes the kernel file to boot.
Only the super-user may reboot() a machine.
SunOS 5.5/SPARC — Last change: 10 Sep 1994