.\" -*- coding: UTF-8 -*- .\" Copyright (c) 1990, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" Chris Torek and the American National Standards Committee X3, .\" on Information Processing Systems. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" @(#)fflush.3 5.4 (Berkeley) 6/29/91 .\" .\" Converted for Linux, Mon Nov 29 15:22:01 1993, faith@cs.unc.edu .\" .\" Modified 2000-07-22 by Nicolás Lichtmaier .\" Modified 2001-10-16 by John Levon .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH FFLUSH 3 "15 septembre 2017" GNU "Manuel du programmeur Linux" .SH NOM fflush \- Vider les tampons d'un flux .SH SYNOPSIS \fB#include \fP .PP \fBint fflush(FILE *\fP\fIflux\fP\fB);\fP .SH DESCRIPTION Pour les flux de sortie, \fBfflush\fP() force l'écriture de toutes les données se trouvant dans les tampons de l'espace utilisateur pour la sortie donnée ou met à jour le \fIflux\fP à l’aide de la fonction d'écriture sous\-jacente. .PP Pour les flux d'entrée associés à des fichiers dans lesquels on peut se positionner (c'est le cas des fichiers sur disque, mais pas des pipes ou des terminaux), \fBfflush\fP() supprime du tampon toute donnée lue depuis le fichier sous\-jacent qui n'a pas été traitée par l'application. .PP L'état d'ouverture du flux n'est pas affecté. .PP .\" mtk: POSIX specifies that only output streams are flushed for this case. .\" Also verified for glibc by experiment. Si l'argument \fIflux\fP est NULL, \fBfflush\fP() vide \fItous\fP les flux ouverts en sortie. .PP Pour une version de cette fonction ignorant les verrouillages, voir \fBunlocked_stdio\fP(3). .SH "VALEUR RENVOYÉE" Si elle réussit, cette fonction renvoie \fB0\fP. Sinon, elle renvoie \fBEOF\fP et la variable \fIerrno\fP contient le code d'erreur. .SH ERREURS .TP \fBEBADF\fP \fIflux\fP n'est pas ouvert, ou du moins pas en écriture. .PP La fonction \fBfflush\fP() peut aussi échouer et définir \fIerrno\fP avec n'importe quelle erreur spécifiée pour la routine \fBwrite\fP(2). .SH ATTRIBUTS Pour une explication des termes utilisés dans cette section, consulter \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Attribut Valeur T{ \fBfflush\fP() T} Sécurité des threads MT\-Safe .TE .SH CONFORMITÉ C89, C99, POSIX.1\-2001, POSIX.1\-2008. .PP POSIX.1\-2008 précise les conditions de vidage des flux en entrée, mais ce n'était pas le cas pour POSIX.1\-2001. .SH NOTES Remarquez que \fBfflush\fP() ne vide que les tampons d'espace utilisateur fournis par la bibliothèque\ C. Pour s'assurer que les données soient écrites physiquement sur le disque, il faut aussi vider les tampons du noyau à l'aide par exemple de \fBsync\fP(2) ou \fBfsync\fP(2). .SH "VOIR AUSSI" \fBfsync\fP(2), \fBsync\fP(2), \fBwrite\fP(2), \fBfclose\fP(3), \fBfileno\fP(3), \fBfopen\fP(3), \fBsetbuf\fP(3), \fBunlocked_stdio\fP(3) .SH COLOPHON Cette page fait partie de la publication\ 5.10 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/. .PP .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 , David Prévot , Frédéric Hantrais et Lucien Gentis . .PP 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. .PP 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 .