Go to the previous, next section.

reboot

SYNOPSIS

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

PARAMETERS

magic: [in] 0xfee1dead.

magic_too: [in] 672274793.

flag: [in] see description.

DESCRIPTION

Reboots the machine or enable the Ctrl-Alt-Del combinaison. magic must be 0xfee1dead and magic_too must be 672274793. If those two conditions are true, then the following values of flag perform the specified operations:

0x1234567
preform a hard reset.

0x89abcdef
Ctrl-Alt-Del is enabled.

0
Ctrl-Atl-Del is disabled and a signal is send to init.

Does not sync!!! The calling task must have superuser privileges.

RETURN VALUE

On success zero is returned. On error -1 is returned and errno is set to one of the following values:

Go to the previous, next section.