source: trunk/minix/man/man2/reboot.2@ 12

Last change on this file since 12 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.3 KB
Line 
1.TH REBOOT 2
2.SH NAME
3reboot \- close down the system or reboot
4.SH SYNTAX
5.ft B
6.nf
7#define _MINIX_SOURCE 1
8
9#include <unistd.h>
10
11int reboot(int \fIhow\fP, ...)
12.fi
13.ft P
14.SH DESCRIPTION
15.B Reboot()
16is used to close down the system. It allows several ways of shutting
17down depending on
18.IR how :
19.PP
20.TP 5
21.BI "reboot(RBT_HALT)"
22Halt the system and return to the monitor prompt.
23.TP
24.BI "reboot(RBT_REBOOT)"
25Reboot the system by letting the monitor execute the "boot" command.
26.TP
27.BI "reboot(RBT_PANIC)"
28Cause a system panic. This is not normally done from user mode, but by
29servers using the
30.B sys_abort()
31kernel call.
32.TP
33.BI "reboot(RBT_MONITOR" ", code, length" ")"
34Halt the system and let the monitor execute the given code of the given
35length.
36.RI ( code
37is of type
38.B "char *"
39and
40.I length
41of type
42.BR size_t .)
43.TP
44.BI "reboot(RBT_RESET)"
45Reboot the system with a hardware reset.
46.PP
47.B Reboot()
48may only be executed by the super-user.
49.SH DIAGNOSTICS
50If the call succeeds, it never returns. If something went wrong,
51the return value is -1 and an error is indicated by
52.BR errno .
53.SH SEE ALSO
54.BR shutdown (8),
55.BR reboot (8),
56.BR halt (8),
57.BR sync (2).
58.SH NOTES
59MINIX 3 can not return to the monitor if running in real mode. This means
60that most of the reboot functions will change to a system reset.
61.SH AUTHOR
62Edvard Tuinder (v892231@si.hhs.NL)
Note: See TracBrowser for help on using the repository browser.