REBOOT(2)

NAME
reboot - reboot or disable CNTRL - ALT - DEL

SYNOPSIS
#include <unistd.h>
int reboot (int magic, int magic_too, int flag);

DESCRIPTION
reboot() reboots the system, or enables / disables CAD.

If magic == 0xfee1dead && magictoo == 672274793, then the action performed will be based on flag.
If flag = 0x1234567, then a hard reset is performed.
If flag = 0x89abcdef, then CAD is enabled.
If flag = 0, then CAD is disabled.

0 is returned on success, a negative value on failure.

Note that reboot() does NOT sync()!

Also, for obvious reasons, only root may call this function.

ERRORS
-EINVAL is returned for bad magic numbers.

-EPERM is returned if a non-root user attempts to call reboot().

FILES
linux/sys.c
/usr/include/linux/sys.h
/usr/include/unistd.h

SEE ALSO
sync(2)