|
|
1.1 root 1: .TH LSEEK 2
2: .CT 2 file_io
3: .SH NAME
4: lseek \(mi seek, move read/write pointer
5: .SH SYNOPSIS
6: .nf
7: .B long lseek(fildes, offset, whence)
8: .B long offset;
9: .fi
10: .SH DESCRIPTION
11: .I Lseek
12: sets the file pointer for the file
13: associated with
14: .I fildes
15: as follows:
16: .IP
17: If
18: .I whence
19: is 0, the pointer is set to
20: .I offset
21: bytes.
22: .IP
23: If
24: .I whence
25: is 1, the pointer is set to its current location plus
26: .IR offset .
27: .IP
28: If
29: .I whence
30: is 2, the pointer is set to the size of the
31: file plus
32: .IR offset .
33: .PP
34: The new file pointer value is returned.
35: .PP
36: Seeking far beyond the end of a file, then writing,
37: creates a gap or `hole,' which occupies no
38: physical space and reads as zeros.
39: .SH "SEE ALSO"
40: .IR open (2),
41: .IR fseek (3)
42: .SH DIAGNOSTICS
43: .BR EBADF ,
44: .BR ESPIPE
45: .SH BUGS
46: .I Lseek
47: doesn't affect some special files.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.