Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ shutdn(S) — Xenix 2.3.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fsck(C)

haltsys(C)

shutdown(C)

mount(S)

kill(S)



     SHUTDN(S)                XENIX System V                 SHUTDN(S)



     Name
          shutdn - Flushes block I/O and halts the CPU.

     Syntax
          #include <sys/filsys.h>
          #include <sys/param.h>
          #include <sys/types.h>

          void shutdn (sblk, ntsblk, arg);
          struct filsys *sblk, *nsblk;
          int arg;

     Description
          shutdn causes all information in memory that should be on
          disk to be written out.  This includes modified super-
          blocks, modified inodes, and delayed block I/O.  The super-
          blocks of all writable file systems are flagged `clean', so
          that they can be remounted without cleaning when XENIX is
          rebooted.  shutdn then prints ``Normal System Shutdown'' on
          the console and halts the CPU.

          The system then stays down or reboots dependant on whether
          arg is 0 or 1.

          If sblk is greater than 1, it specifies the address of a
          super-block to be written to the root device as the last I/O
          before the halt, provided that nsblk is given as its bit-
          wise inverse.  This facility is provided to allow file
          system repair programs to supercede the system's copy of the
          root super-block with one of their own.

          If sblk is 1, the second argument is a command and the third
          argument is the argument to the command.  The CONFPANIC
          command, a system configurable system call, is given the
          argument 0 to stay down, or 1 to reboot. When shutdn is
          called in this way, the purpose is not to bring down the
          system, but rather, to give instructions to the kernel
          regarding the way to deal with the next panic.

          shutdn locks out all other processes while it is doing its
          work.  However, it is recommended that user processes be
          killed off (see kill(S)) before calling shutdn as some types
          of disk activity could cause file systems to not be flagged
          ``clean''.

          The caller must be the super-user.









     Page 1                                           (printed 8/7/87)





     SHUTDN(S)                XENIX System V                 SHUTDN(S)



     See Also
          fsck(C), haltsys(C), shutdown(C), mount(S), kill(S)

     Notes
          This routine must be linked using the linker option -lx.


















































     Page 2                                           (printed 8/7/87)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026