File: pread.2

package info (click to toggle)
manpages-pt 20040726-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 2,988 kB
  • ctags: 1
  • sloc: sh: 45; makefile: 14
file content (91 lines) | stat: -rw-r--r-- 3,135 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
.\" -*- nroof -*-
.\" Copyright (C) 1999 Joseph Samuel Myers.
.\"
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Permission is granted to copy and distribute modified versions of this
.\" manual under the conditions for verbatim copying, provided that the
.\" entire resulting derived work is distributed under the terms of a
.\" permission notice identical to this one.
.\" 
.\" Since the Linux kernel and libraries are constantly changing, this
.\" manual page may be incorrect or out-of-date.  The author(s) assume no
.\" responsibility for errors or omissions, or for damages resulting from
.\" the use of the information contained herein.  The author(s) may not
.\" have taken the same level of care in the production of this manual,
.\" which is licensed free of charge, as they might when working
.\" professionally.
.\" 
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
.\"
.TH PREAD 2 "21/01/1999" "Linux 2.2.0-pre9" "Manual do Programador Linux"
.SH NOME
pread, pwrite \- l a partir de ou escreve para um descritor de arquivo em um dado offset
.SH SINOPSE
.B #define _XOPEN_SOURCE 500
.sp
.B #include <unistd.h>
.sp
.BI "ssize_t pread(int " fd ", void *" buf ", size_t " count ", off_t " offset );
.sp
.BI "ssize_t pwrite(int " fd ", const void *" buf ", size_t " count ", off_t " offset );
.fi
.SH DESCRIO
.B pread()
faz a leitura dos bytes
.I count
a partir do descritor de arquivos
.I fd
em offset
.I offset
(a partir do incio do arquivo) para o interior do buffer iniciando em
.IR buf .
O arquivo offset no  alterado.
.PP
.B pwrite()
faz a escrita dos bytes
.I count
bytes from the buffer starting at
.I buf
a partir do descritor de arquivos
.I fd
em offset
.IR offset .
O arquivo offset no  alterado.
.PP
O arquivo referenciado por
.I fd
deve ser capaz de ser procurado.
.SH "VALORES RETORNADOS"
Em caso de sucesso, o nmero de bytes lidos ou escritos  retornado (zero
indica que nada for escrito, no caso de \fBpwrite\fR, ou
final de arquivo, no caso de \fBpread\fR), ou \-1 em caso de erro, em cada
caso
.I errno
 selecionada para indicar o erro.
.SH ERROS
.B pread
pode falhar e selecionar
.I errno
para qualquer erro especificado por \fBread\fR(2) ou \fBlseek\fR(2).
.B pwrite
pode falhar e selecionar
.I errno
para qualquer erro especificado por \fBwrite\fR(2) ou \fBlseek\fR(2).
.SH "DE ACORDO DE"
Unix98
.SH HISTRIA
As chamadas de sistema \fBpread\fR e \fBpwrite\fR foram adicionadas no Linux na
verso 2.1.60; as entradas nas tabelas das chamadas de sistemas i386 foram adicionadas
na verso 2.1.69. O suporte na libc support (incluindo emulaao para kerneis antigos
sem chamadas de sistema) foram adicionadas na glibc 2.1.
.SH "VEJA TAMBM"
.BR read (2),
.BR write (2),
.BR lseek (2)
.SH TRADUZIDO POR LDP-BR em 21/08/2000.
\&\fR\&\f(CWAndr L. Fassone Canova <lonelywolf@blv.com.br> (traduo)\fR
\&\fR\&\f(CWxxxxxxxxxxxxxxxxxxxxxxxxx <xxx@xxxxxx.xxx.xx> (reviso)\fR