syscall – test a system call
invokes the system call
with the given arguments.
The return value is printed.
If an error occured, the error string is also printed.
are included in
even though they are not strictly syscalls.
arguments are integer constants, strings, or the literal
refers to a writable 1 megabyte buffer.
are passed as pointers.
Integers are passed as values.
option prints contents of the 1MB buffer.
the buffer is treated as a 0-terminated string.
For other calls, the number of bytes printed is
determined by the system call’s return value.
option is similar, but interprets the data as a
message and formats it to standard output.
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