REBOOT(2)

NAME
reboot - close down the system or reboot

SYNTAX
int reboot(int flag)

DESCRIPTION
Reboot() is used to close down the system. It currently allows two ways of shutting down: a reboot (flag is 1) or a halt (flag is 0). The procedure eliminates all the running processes and then sync's the disks and marks all mounted file systems as being clean. After this the required action indicated by flag is taken.

Reboot() may only be executed by the super-user.

DIAGNOSTICS
If the call succeeds, it never returns. If something went wrong, the return value is -1 and an error is indicated by errno.

SEE ALSO
shutdown(8), reboot(8), halt(8), sync(1).

AUTHOR
Edvard Tuinder (v892231@si.hhs.NL)