reboot.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <html>
  2. <head>
  3. <title>reboot</title>
  4. <body bgcolor=#ffffff>
  5. <h2 align=center>reboot</h2>
  6. <h4 align=center>OS/161 Reference Manual</h4>
  7. <h3>Name</h3>
  8. reboot - reboot or halt system
  9. <h3>Library</h3>
  10. Standard C Library (libc, -lc)
  11. <h3>Synopsis</h3>
  12. #include &lt;unistd.h&gt;<br>
  13. <br>
  14. int<br>
  15. reboot(int <em>code</em>);
  16. <h3>Description</h3>
  17. reboot reboots or shuts down the system. The specific action depends
  18. on the <em>code</em> passed:
  19. <blockquote><table width=90%>
  20. <td width=10%>RB_REBOOT</td> <td>The system is rebooted.</td></tr>
  21. <td width=10%>RB_HALT</td> <td>The system is halted.</td></tr>
  22. <td width=10%>RB_POWEROFF</td> <td>The system is powered off.</td></tr>
  23. </table></blockquote>
  24. <h3>Return Values</h3>
  25. On success, reboot does not return. On error, -1 is returned, and
  26. <A HREF=errno.html>errno</A> is set according to the error
  27. encountered.
  28. <h3>Errors</h3>
  29. The following error codes should be returned under the conditions
  30. given. Other error codes may be returned for other errors not
  31. mentioned here.
  32. <blockquote><table width=90%>
  33. <td width=10%>&nbsp;</td><td>&nbsp;</td></tr>
  34. <tr><td>EINVAL</td> <td><em>code</em> was not a valid
  35. value.</td></tr>
  36. <tr><td>EPERM</td> <td>The current process does not have
  37. sufficient privilege to halt the
  38. system.</td></tr>
  39. </table></blockquote>
  40. </body>
  41. </html>