


REBOOT(2)                 SYSTEM CALLS                  REBOOT(2)



NAME
     reboot - reboot system or halt processor

SYNOPSIS
     #include <sys/reboot.h>

     reboot(howto, [ bootargs ] )
     int howto;
     char *bootargs;

DESCRIPTION
     reboot() reboots the system, and is invoked automatically in
     the event of unrecoverable system failures.  _h_o_w_t_o is a mask
     of options passed to the bootstrap program.  The system call
     interface  permits  only RB_HALT or RB_AUTOBOOT to be passed
     to the reboot program; the other flags are used  in  scripts
     stored  on  the  console  storage  media,  or used in manual
     bootstrap procedures.   When  none  of  these  options  (for
     instance  RB_AUTOBOOT) is given, the system is rebooted from
     file /vmunix in the root file system of unit  0  of  a  disk
     chosen  in  a  processor  specific  way.   An automatic con-
     sistency check of the disks is then normally performed.

     The bits of _h_o_w_t_o are:

     RB_HALT        the processor is  simply  halted;  no  reboot
                    takes  place.   RB_HALT  should  be used with
                    caution.

     RB_ASKNAME     Interpreted by the bootstrap program  itself,
                    causing  it to inquire as to what file should
                    be booted.  Normally, the  system  is  booted
                    from the file /vmunix without asking.

     RB_SINGLE      Normally, the reboot  procedure  involves  an
                    automatic  disk  consistency  check  and then
                    multi-user  operations.   RB_SINGLE  prevents
                    the  consistency check, rather simply booting
                    the system with a single-user  shell  on  the
                    console.   RB_SINGLE  is  interpreted  by the
                    init(8) program in the newly booted system.

     RB_DUMP        A  system  core  dump  is  performed   before
                    rebooting.

     RB_STRING      The optional argument _b_o_o_t_a_r_g_s is  passed  to
                    the  bootstrap  program.   See  boot(8S)  for
                    details.  This option overrides RB_SINGLE but
                    the  same effect can be achieved by including
                    -s as an option in _b_o_o_t_a_r_g_s.





Sun Release 4.1   Last change: 21 January 1990                  1






REBOOT(2)                 SYSTEM CALLS                  REBOOT(2)



     Only the super-user may reboot() a machine.

RETURN VALUES
     On success,  reboot()  does  not  return.   On  failure,  it
     returns -1 and sets errno to indicate the error.

ERRORS
     EPERM          The caller is not the super-user.

FILES
     /vmunix

SEE ALSO
     panic(8S), halt(8), init(8), intro(8), reboot(8)









































Sun Release 4.1   Last change: 21 January 1990                  2



