.\" -*- coding: UTF-8 -*- .\" This manpage is Copyright (C) 2006 Jens Axboe .\" and Copyright (C) 2006 Michael Kerrisk .\" .\" %%%LICENSE_START(VERBATIM) .\" 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_END .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH VMSPLICE 2 "6 mars 2019" Linux "Manuel du programmeur Linux" .SH NOM vmsplice \- splice user pages to/from a pipe .SH SYNOPSIS .nf \fB#define _GNU_SOURCE\fP /* Consultez feature_test_macros(7) */ \fB#include \fP \fB#include \fP .PP \fBssize_t vmsplice(int \fP\fIfd\fP\fB, const struct iovec *\fP\fIiov\fP\fB,\fP \fB unsigned long \fP\fInr_segs\fP\fB, unsigned int \fP\fIflags\fP\fB);\fP .fi .\" Return type was long before glibc 2.7 .SH DESCRIPTION .\" Linus: vmsplice() system call to basically do a "write to .\" the buffer", but using the reference counting and VM traversal .\" to actually fill the buffer. This means that the user needs to .\" be careful not to reuse the user-space buffer it spliced into .\" the kernel-space one (contrast this to "write()", which copies .\" the actual data, and you can thus reuse the buffer immediately .\" after a successful write), but that is often easy to do. .\" Since Linux 2.6.23 .\" commit 6a14b90bb6bc7cd83e2a444bf457a2ea645cbfe7 If \fIfd\fP is opened for writing, the \fBvmsplice\fP() system call maps \fInr_segs\fP ranges of user memory described by \fIiov\fP into a pipe. If \fIfd\fP is opened for reading, the \fBvmsplice\fP() system call fills \fInr_segs\fP ranges of user memory described by \fIiov\fP from a pipe. The file descriptor \fIfd\fP must refer to a pipe. .PP Le pointeur \fIiov\fP pointe vers un tableau de structures \fIiovec\fP définies dans \fI\fP\ : .PP .in +4n .EX struct iovec { void *iov_base; /* Starting address */ size_t iov_len; /* Number of bytes */ }; .EE .in .PP L'argument \fIflags\fP est constitué par un \fIOU\fP binaire entre une ou plusieurs des valeurs suivantes\ : .TP \fBSPLICE_F_MOVE\fP Non utilisé pour \fBvmsplice\fP()\ ; consultez \fBsplice\fP(2). .TP \fBSPLICE_F_NONBLOCK\fP .\" Not used for vmsplice .\" May be in the future -- therefore EAGAIN Ne pas bloquer pendant les entrées\-sorties\ ; consultez \fBsplice\fP(2) pour plus de détails. .TP \fBSPLICE_F_MORE\fP N'a pas d'effet pour \fBvmsplice\fP() actuellement, mais pourrait être implémenté un jour\ ; consultez \fBsplice\fP(2). .TP \fBSPLICE_F_GIFT\fP .\" FIXME . Explain the following line in a little more detail: .\" FIXME .\" It looks like the page-alignment requirement went away with .\" commit bd1a68b59c8e3bce45fb76632c64e1e063c3962d .\" .\" .... if we expect to later SPLICE_F_MOVE to the cache. The user pages are a gift to the kernel. The application may not modify this memory ever, otherwise the page cache and on\-disk data may differ. Gifting pages to the kernel means that a subsequent \fBsplice\fP(2) \fBSPLICE_F_MOVE\fP can successfully move the pages; if this flag is not specified, then a subsequent \fBsplice\fP(2) \fBSPLICE_F_MOVE\fP must copy the pages. Data must also be properly page aligned, both in memory and length. .SH "VALEUR RENVOYÉE" S'il réussit, \fBvmsplice\fP() renvoie le nombre d'octets transférés dans le tube. En cas d'erreur, \fBvmsplice\fP() renvoie \-1 et \fIerrno\fP contient le code d'erreur. .SH ERREURS .TP \fBEAGAIN\fP \fBSPLICE_F_NONBLOCK\fP était indiqué dans \fIflags\fP, et l'opération pourrait bloquer. .TP \fBEBADF\fP \fIfd\fP est invalide ou ne correspond pas à un tube. .TP \fBEINVAL\fP \fInr_segs\fP is greater than \fBIOV_MAX\fP; or memory not aligned if \fBSPLICE_F_GIFT\fP set. .TP \fBENOMEM\fP Plus assez de mémoire. .SH VERSIONS L'appel système \fBvmsplice\fP() est apparu dans Linux\ 2.6.17, la glibc le gère depuis la version\ 2.5. .SH CONFORMITÉ Cet appel système est spécifique à Linux. .SH NOTES .\" UIO_MAXIOV in kernel source \fBvmsplice\fP() follows the other vectorized read/write type functions when it comes to limitations on the number of segments being passed in. This limit is \fBIOV_MAX\fP as defined in \fI\fP. Currently, this limit is 1024. .PP .\" commit 6a14b90bb6bc7cd83e2a444bf457a2ea645cbfe7 \fBvmsplice\fP() really supports true splicing only from user memory to a pipe. In the opposite direction, it actually just copies the data to userspace. But this makes the interface nice and symmetric and enables people to build on \fBvmsplice\fP() with room for future improvement in performance. .SH "VOIR AUSSI" \fBsplice\fP(2), \fBtee\fP(2), \fBpipe\fP(7) .SH COLOPHON Cette page fait partie de la publication\ 5.04 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies et la dernière version de cette page peuvent être trouvées à l'adresse \%https://www.kernel.org/doc/man\-pages/. .SH TRADUCTION La traduction française de cette page de manuel a été créée par Christophe Blaess , Stéphan Rafin , Thierry Vignaud , François Micaux, Alain Portal , Jean-Philippe Guérard , Jean-Luc Coulon (f5ibh) , Julien Cristau , Thomas Huriaux , Nicolas François , Florentin Duneau , Simon Paillard , Denis Barbier et David Prévot . Cette traduction est une documentation libre ; veuillez vous reporter à la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License version 3 .UE concernant les conditions de copie et de distribution. Il n'y a aucune RESPONSABILITÉ LÉGALE. Si vous découvrez un bogue dans la traduction de cette page de manuel, veuillez envoyer un message à .MT debian-l10n-french@lists.debian.org .ME .