SYSCALL(1)                                             SYSCALL(1)

     NAME
          syscall  - test a system call

     SYNOPSIS
          syscall [ -o ] entry [ arg ... ]

     DESCRIPTION
          Syscall makes the entry system call with the given argu-
          ments.  It prints the return value and the error string, if
          there was an error.  An argument is either an integer con-
          stant as in C (its value is passed), a string (its address
          is passed), or the literal buf (a pointer to a 1 Kbyte
          buffer is passed).  If -o is given, the contents of the 1
          Kbyte buffer are printed as a string after the system call
          is done.

     EXAMPLES
          Write a string to standard output

               syscall write 1 hello 5

          Print the last system call error string

               syscall -o errstr buf

     SEE ALSO
          Section 2 of this manual.

     DIAGNOSTICS
          If entry is not a system call name, the exit status is
          `unknown'.  If the system call succeeds, the exit status is
          null; otherwise the exit status is the string that errstr(2)
          returns.

     Page 1                       Plan 9             (printed 4/19/24)