syscall - test a system call
$ syscall [-o] [-l] [-h] <syscall-name> <args...> [buf==BUFSIZ buffer]
The syscall utility can be used to invoke a system call with the given arguments.
-o: Output the contents of the buffer argument specified as buf to stdout.-l: Print a space separated list of all the Serenity system calls and exit. Note that not all the system calls can be invoked using this tool.-h: Print a help message and exit.Write a string to standard output:
$ syscall write 1 hello 5Read a string from the standard input into a buffer and output the buffer contents to stdout:
$ syscall -o read 0 buf 3Get the pid of the current running process:
$ syscall getpidSleep for 3 seconds:
$ syscall sleep 3Create a directory:
$ syscall mkdir my-dir 0755Exit the program with status 2:
$ syscall exit 2This is a direct port of a utility with the same name originated from the Plan 9 operating system.