Files
oldlinux-files/Minix/2.0.0/wwwman/man2/reboot.2.html
2024-02-19 00:21:39 -05:00

76 lines
2.2 KiB
HTML

<HTML>
<HEAD>
<TITLE>reboot(2)</TITLE>
</HEAD>
<BODY>
<H1>reboot(2)</H1>
<HR>
<PRE>
</PRE>
<H2>NAME</H2><PRE>
reboot - close down the system or reboot
</PRE>
<H2>SYNTAX</H2><PRE>
<STRONG>#define</STRONG> <STRONG>_MINIX_SOURCE</STRONG> <STRONG>1</STRONG>
<STRONG>#include</STRONG> <STRONG>&lt;unistd.h&gt;</STRONG>
<STRONG>int</STRONG> <STRONG>reboot(int</STRONG> <EM>how</EM><STRONG>,</STRONG> <STRONG>...)</STRONG>
</PRE>
<H2>DESCRIPTION</H2><PRE>
<STRONG>Reboot()</STRONG> is used to close down the system. It allows several ways of
shutting down depending on <EM>how</EM>:
<STRONG>reboot(RBT_HALT)</STRONG>
Halt the system and return to the monitor prompt.
<STRONG>reboot(RBT_REBOOT)</STRONG>
Reboot the system by letting the monitor execute the "boot" command.
<STRONG>reboot(RBT_PANIC)</STRONG>
Cause a system panic. This is not normally done from user mode, but
by servers using the <STRONG>sys_abort()</STRONG> kernel call.
<STRONG>reboot(RBT_MONITOR</STRONG>, <EM>code</EM>, <EM>length</EM><STRONG>)</STRONG>
Halt the system and let the monitor execute the given code of the
given length. (<EM>code</EM> is of type <STRONG>char</STRONG> <STRONG>*</STRONG> and <EM>length</EM> of type <STRONG>size_t</STRONG>.)
<STRONG>reboot(RBT_RESET)</STRONG>
Reboot the system with a hardware reset.
<STRONG>Reboot()</STRONG> may only be executed by the super-user.
</PRE>
<H2>DIAGNOSTICS</H2><PRE>
If the call succeeds, it never returns. If something went wrong, the
return value is -1 and an error is indicated by <STRONG>errno</STRONG>.
</PRE>
<H2>SEE ALSO</H2><PRE>
<STRONG><A HREF="../man8/shutdown.8.html">shutdown(8)</A></STRONG>, <STRONG><A HREF="../man8/reboot.8.html">reboot(8)</A></STRONG>, <STRONG><A HREF="../man8/halt.8.html">halt(8)</A></STRONG>, <STRONG><A HREF="../man1/sync.1.html">sync(1)</A></STRONG>.
</PRE>
<H2>NOTES</H2><PRE>
Minix can not return to the monitor if running in real mode, or if
started from MS-DOS. This means that most of the reboot functions will
change to a reset.
</PRE>
<H2>AUTHOR</H2><PRE>
Edvard Tuinder (v892231@si.hhs.NL)
</PRE>
</BODY>
</HTML>