.\" Copyright (c) 1992 Drew Eckhardt (drew@cs.colorado.edu), March 28, 1992 .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified by Michael Haardt .\" .\" Tue Jul 6 22:36:09 MDT 1993 .\" Made this clearer... .\" Modified Sat Jul 24 00:16:05 1993 by Rik Faith .\" Modified Tue Oct 22 17:43:18 1996 by Eric S. Raymond .\" .TH REBOOT 2 "March 28, 1992" "Linux 0.99.10" "Linux Programmer's Manual" .SH NAME reboot \- reboot or disable Ctrl-Alt-Del .SH SYNOPSIS .B #include .sp .BI "int reboot (int " magic ", int " magic_too ", int " flag ); .SH DESCRIPTION .B reboot reboots the system, or enables/disables the Ctrl-Alt-Delete (CAD) reboot keystroke. .PP If .I magic == 0xfee1dead && .I magictoo == 672274793, then the action performed will be based on .IR flag . .sp If \fIflag\fP = 0x1234567, then a hard reset is performed. .br If \fIflag\fP = 0x89abcdef, then CAD is enabled. .br If \fIflag\fP = 0, then CAD is disabled and a signal is sent to process ID 1. Note that .B reboot() does .I not .B sync()! Only the super-user may use this function. .SH "RETURN VALUE" On success, zero is returned. On error, \-1 is returned, and .I errno is set appropriately. .SH ERRORS .TP 0.8i .B EINVAL Bad \fImagic\fP numbers or \fIflag\fP. .TP .B EPERM A non-root user attempts to call .BR reboot . .SH "CONFORMING TO" .B reboot is Linux specific, and should not be used in programs intended to be portable. .SH "SEE ALSO" .BR sync "(2), " ctrlaltdel "(8), " halt "(8), " reboot (8)