File: readv.3

package info (click to toggle)
manpages-fr 0.9.3-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 7,052 kB
  • ctags: 4
  • sloc: makefile: 58; sh: 8
file content (132 lines) | stat: -rw-r--r-- 3,678 bytes parent folder | download
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
.\" (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\"
.\" 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.
.\" License.
.\" Modified Sat Jul 24 18:34:44 1993 by Rik Faith (faith@cs.unc.edu)
.\"
.\" Traduction 06/11/1996 par Christophe Blaess (ccb@club-internet.fr)
.\"
.\" Mise  jour 06/06/2001 - LDP-man-pages-1.36
.TH READV 3 "6 juin 2001" GNU "Manuel du programmeur Linux" 
.SH NOM
readv, writev \- Lire ou crire des donnes dans des buffers multiples.
.SH SYNOPSIS
.nf
.B #include <sys/uio.h>
.sp
.BI "int readv (int " filedes ", const struct iovec *" vector ","
.BI "          size_t " count ");"
.sp
.BI "int writev (int " filedes ", const struct iovec *" vector ","
.BI "          size_t " count ");"
.fi
.SH DESCRIPTION
La fonction
.B readv()
lit
.I count
blocs depuis le fichier associ au descripteur
.I filedes
et les place dans les multiples buffers dcrits par
.IR vector .
.PP
La fonction
.B writev()
crit au plus
.I count
blocs contenus dans les multiples buffers dcrits par
.IR vector ,
dans le fichier associ au descripteur
.IR filedes .
.PP
.I vector
pointe vers une
.B struct iovec
dfinie dans
.B <sys/uio.h>
ainsi :
.PP
.br
.nf
struct iovec {
  void  *iov_base;  /* Adresse de dpart */
  size_t iov_len;   /* Nombre d'octets   */
};
.fi
.PP
Les buffers sont traits dans l'ordre
.IR "vector[0]" ", " vector[1] ", ... " "vector[count]" .
.PP
La fonction
.B readv()
se comporte exactement comme
.BR read (2)
sauf que plusieurs buffers sont remplis.
.PP
La fonction
.B writev()
se comporte exactement comme
.BR write (2)
sauf que plusieurs buffers sont copis dans le fichier.
.PP
.SH "VALEUR RENVOYE"
La fonction
.B readv()
renvoie le nombre d'octets lus, ou \-1 si elle choue. La fonction
.B writev()
renvoie le nombre d'octets crits. En cas d'chec \fIerrno\fP contient
le code d'erreur.
.SH "ERREURS"
.TP
.B EBADF
.I fd
n'est pas un descripteur de fichier valide.
.TP
.B EINVAL
.I fd
n'est pas accessible en lecture (avec
.BR readv() )
ou en criture (avec
.BR writev() ).
.TP
.B EFAULT
.I buf
pointe en dehors de l'espace d'adressage accessible.
.TP
.B EAGAIN
On a rclam des entres/sorties non-bloquantes lors de l'appel
.BR open() ,
et la lecture ou l'criture sont impossibles pour le moment.
.TP
.B EINTR
La lecture ou l'criture ont t interrompues avant de pouvoir traiter
des donnes.
.SH "CONFORMIT"
inconnu
.SH "BOGUES"
Il est fortement dconseille de mlanger les appels  des fonctions comme
.BR readv() " ou " writev() ,
qui travaillent sur les descripteurs de fichiers, avec les fonctions de
la bibliothque stdio. Les rsultats sont imprvisibles.
.SH "VOIR AUSSI"
.BR read "(2), " write (2)
.SH TRADUCTION
Christophe Blaess, 1997.