Flashnux

GNU/Linux man pages

Livre :
Expressions régulières,
Syntaxe et mise en oeuvre :

ISBN : 978-2-7460-9712-4
EAN : 9782746097124
(Editions ENI)

GNU/Linux

RedHat 5.2

(Apollo)

reboot(2)


REBOOT

REBOOT

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
CONFORMING TO
SEE ALSO

NAME

reboot − reboot or disable Ctrl-Alt-Del

SYNOPSIS

#include <unistd.h>

int reboot (int magic, int magic_too, int flag);

DESCRIPTION

reboot reboots the system, or enables/disables the Ctrl-Alt-Delete (CAD) reboot keystroke.

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, and should not be used in programs intended to be portable.

SEE ALSO

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



reboot(2)