|
|
1.1 root 1: .TH SYSCALL 1
2: .SH NAME
3: syscall \- test a system call
4: .SH SYNOPSIS
5: .B syscall
6: [
7: .B -o
8: ]
9: .I entry
10: [
11: .I arg ...
12: ]
13: .SH DESCRIPTION
14: .I Syscall
15: invokes the system call
16: .I entry
17: with the given arguments.
18: It prints the return value and the error string, if there was an error.
19: An argument is either an integer constant as in C (its value is passed),
20: a string (its address is passed),
21: or the literal
22: .B buf
23: (a pointer to a 1 Kbyte buffer is passed).
24: If
25: .B -o
26: is given, the contents of the 1 Kbyte buffer are printed as a zero-terminated string
27: after the system call is done.
28: .SH EXAMPLES
29: Write a string to standard output
30: .IP
31: .EX
32: syscall write 1 hello 5
33: .EE
34: .PP
35: Print the name of the file connected to standard input
36: .IP
37: .EX
38: syscall -o fstat 0 buf
39: .EE
40: .SH SOURCE
41: .B /sys/src/cmd/syscall
42: .SH "SEE ALSO"
43: Section 2 of this manual.
44: .SH DIAGNOSTICS
45: If
46: .I entry
47: is not a system call name, the exit status is
48: .LR unknown .
49: If the system call succeeds, the exit status is null;
50: otherwise the exit status is the string that
51: .IR errstr (2)
52: returns.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.