Performs a specified subroutine call.
syscall [ -n ] Name [ Argument1 ... ArgumentN ] [ ; Name [ Argument1 ... ArgumentN ] ] ...
The syscall command
executes a system call interface program, which performs the subroutine call
specified by the Name parameter. If you specify the
-n flag, the syscall command performs the call
n times. Arguments specified by the Argument
parameter are passed to the subroutine without error checking. The
Argument parameter can be expressed in the following formats:
The syscall command prints a message and exits for unknown subroutines and for subroutines that return a value of -1.
Note: The syscall command understands the sleep subroutine as a special case subroutine.
-n | Specifies the number of times the syscall command performs the specified subroutine. |
; | Separates multiple subroutines (up to a maximum of 20) issued by the same invocation of the syscall command. |
Access Control: You must have root authority to run this command.
To simulate the C program fragment:
output=open("x", 401, 0755);
write(output, "hello", strlen("hello"));
syscall open x 401 0755 \; write \$0 hello \#hello
Note: Special shell characters must be escaped.
/usr/bin/syscall | Contains the syscall command. |
The bsh command, Rsh command, csh command, ksh command, sh command.
The open subroutine, sleep subroutine.
Shells Overview in AIX 5L Version 5.1 System User's Guide: Operating System and Devices.