REBOOT

Section: Linux Programmer's Manual (2)
Updated: March 28, 1992
Index Return to Main Contents
 

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 and a signal is sent to process ID 1.

Note that reboot() does not sync()!

Only the super-user may use this function.  

RETURN VALUE

On success, zero is returned. On error, -1 is returned, and errno is set appropriately.  

ERRORS

EINVAL
Bad magic numbers or flag.
EPERM
A non-root user attempts to call reboot.
 

CONFORMING TO

reboot is Linux specific.  

SEE ALSO

sync(2), ctrlaltdel(8), halt(8), reboot(8)


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 12:24:49 GMT, March 22, 2025