 |
Index for Section 2 |
|
 |
Alphabetical listing for R |
|
 |
Bottom of page |
|
reboot(2)
NAME
reboot - Reboots system or halts processor
SYNOPSIS
#include <sys/reboot.h>
void reboot(
int howto );
PARAMETERS
howto 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 unrecoverable 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.
RB_AUTOBOOT
The default, causing the system to reboot in its usual fashion.
RB_DUMP Dump kernel memory before rebooting; see the savecore command for
more information.
RB_HALT The processor is simply halted; no reboot takes place.
RB_NOSYNC 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.
Caution
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:
[EPERM] The calling process does not have appropriate privilege.
RELATED INFORMATION
Commands: crashdc(8),
halt(8), init(8), reboot(8), savecore(8)
 |
Index for Section 2 |
|
 |
Alphabetical listing for R |
|
 |
Top of page |
|