reboot(2) [osf1 man page]
reboot(2) System Calls Manual reboot(2) NAME
reboot - Reboots system or halts processor SYNOPSIS
#include <sys/reboot.h> void reboot( int howto ); PARAMETERS
Specifies a mask of options. DESCRIPTION
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 unre- coverable system failures. The following options, defined in the sys/reboot.h include file are passed to the new kernel or the new bootstrap and init programs. They are supplied as values to the howto parameter. The default, causing the system to reboot in its usual fashion. Dump kernel memory before rebooting; see the savecore command for more information. The processor is simply halted; no reboot takes place. The disks are not sync'd before the processor is halted or rebooted. Normally, the disks are sync'd (see the sync() command) before the processor is halted or rebooted. Because the disks are not sync'd with 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 of unit 0 (zero) of a disk chosen in a processor-specific way. (see the fsck command). RETURN VALUES
If successful, this call does not return. Otherwise, a -1 is returned and errno is set to indicate the error. ERRORS
If the reboot() function fails, errno may be set to the following value: The calling process does not have appropriate privilege. RELATED INFORMATION
Commands: crashdc(8), halt(8), init(8), reboot(8), savecore(8) delim off reboot(2)
Check Out this Related Man Page
reboot(2) System Calls Manual reboot(2) Name reboot - reboot system or halt processor Syntax #include <sys/reboot.h> reboot(howto) int howto; Arguments howto The howto argument is a mask of options passed to the bootstrap program. The bits of howto are: 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 itself, causing it to inquire as to what file should be booted. Normally, the system is booted from the file "xx(0,0)vmunix" without asking. RB_SINGLE Normally, the reboot procedure involves an automatic disk consistency check and then multi-user operations. RB_SINGLE pre- vents the consistency check, rather simply booting the system with a single-user shell on the console. RB_SINGLE is inter- preted by the init(8) program in the newly booted system. This switch is not available from the system call interface. Only the superuser may a machine. Description The system call reboots the system, and is invoked automatically in the event of unrecoverable system failures. The system call interface permits only RB_HALT or RB_AUTOBOOT to be passed to the reboot program; the other flags are used in scripts stored on the console storage media or used in manual bootstrap procedures. When none of these options (for example, RB_AUTOBOOT) is given, the system is rebooted from file in the root file system of unit 0 of a disk chosen in a processor-specific way. Normally, an automatic consistency check of the disks is then performed. Return Values If successful, this call never returns. Otherwise, a -1 is returned, and an error is stored in the global variable errno. Diagnostics The call fails under the following condition: [EPERM] The caller is not the superuser. See Also crash(8v), halt(8), init(8), reboot(8) reboot(2)