SYSCALL(8) —
NAME
syscall − system call interface program
SYNOPSIS
/etc/syscall [ −n] name [arg ...]
DESCRIPTION
Syscall is used to reduce the size of a miniroot by replacing several large, commonly used utilities with small shell scripts that call one small program (syscall) in order to perform system calls. If n is specified, syscall performs the system call(s) n times. No error checking is done on the arguments passed to a system call.
The arguments can be of the following formats:
; Separates multiple system calls (up to a maximum of 20) issued by the same invocation of syscall.
0xnnn Hexadecimal constant nnn.
0nnn Octal constant nnn.
nnn
+nnn
-nnn
Decimal constant nnn.
”string
’string
\string
The character string “string”.
#string
The length of the character string “string”.
&&n The address of the nth argument to this system call (n=0 is the system call name).
&n The address of the nth byte in an internal 10k buffer.
$n The result of the nth system call (n=0 is the first system call).
string Anything else is a literal character string.
Syscall also understands the following special case “system calls”:
sleep The library function sleep(3).
EXAMPLE
The C fragment:
output = open("x",1);
write(output,"hello",strlen("hello"));
can be simulated by:
syscall open x 1 \; write \$0 hello \#hello
Note that characters that are special to the shell must be escaped. Refer to sh(1) or csh(1), depending on which shell you are using.
DIAGNOSTICS
Prints message and exits for unknown system calls and for system calls that return -1.
SEE ALSO
intro(2), sleep(3), syscall(2)
BUGS
Syscall does no error checking of its arguments.
PRPQs 5799-WZQ/5799-PFF: IBM/4.3 — December 1988