syscall(1) - SerenityOS man pages

#Name

syscall - test a system call

#Synopsis

$ syscall [-o] [-l] [-h] <syscall-name> <args...> [buf==BUFSIZ buffer]

#Description

The syscall utility can be used to invoke a system call with the given arguments.

#Options

#Examples

Write a string to standard output:

$ syscall write 1 hello 5

Read a string from the standard input into a buffer and output the buffer contents to stdout:

$ syscall -o read 0 buf 3

Get the pid of the current running process:

$ syscall getpid

Sleep for 3 seconds:

$ syscall sleep 3

Create a directory:

$ syscall mkdir my-dir 0755

Exit the program with status 2:

$ syscall exit 2

#History

This is a direct port of a utility with the same name originated from the Plan 9 operating system.