syscall – test a system call
invokes the system call
with the given arguments.
(Some functions, such as
although not strictly system calls, are valid
It prints the return value and the error string, if there was an error.
An argument is either an integer constant as in C (its value is passed),
a string (its address is passed),
or the literal
(a pointer to a 1MB buffer is passed).
is given, the contents of the 1MB buffer are printed as a zero-terminated string
after the system call is done.
options are similar, but
formats the data as hexadecimal bytes, while
interprets the data as a
message and formats it similar to the style of
with extra detail about the modify and access times.
Write a string to standard output:
syscall write 1 hello 5
Print information about the file connected to standard input:
syscall -s fstat 0 buf 1024
Section 2 of this manual.
is not known to
the exit status is
If the system call succeeds, the exit status is null;
otherwise the exit status is the string that