[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    reboot(3C) manual page Table of Contents

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.


Table of Contents