.\" -*- 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 "12. Dezember 2016" GNU Linux\-Programmierhandbuch .SH BEZEICHNUNG fflush \- einen Datenstrom leeren .SH ÜBERSICHT \fB#include \fP .sp \fBint fflush( FILE *\fP\fIdatenstrom\fP\fB);\fP .SH BESCHREIBUNG Für Ausgabedatenströme erzwingt \fBfflush\fP() das Schreiben aller im User Space gepufferten Daten der gegebenen Ausgabe oder ruft die dem \fIDatenstrom\fP zugrundeliegende Funktion »write« auf, um ihn zu aktualisieren. Für Eingabedatenströme, die zu durchsuchbaren Dateien gehören (z.B. Plattendateien, jedoch keine Pipes oder Terminals) verwirft \fBfflush\fP() alle gepufferten Daten, die aus der zugrundeliegenden Datei abgerufen aber nicht von der Anwendung verarbeitet wurden. Der »geöffnet«\-Status des Datenstroms ist nicht davon betroffen. .PP .\" mtk: POSIX specifies that only output streams are flushed for this case. .\" Also verified for glibc by experiment. Falls das Argument \fIdatenstrom\fP NULL ist, leert \fBfflush\fP() \fIalle\fP Ausgabedatenströme. .PP Für ein nicht sperrendes Gegenstück siehe \fBunlocked_stdio\fP(3). .SH RÜCKGABEWERT Nach erfolgreichem Programmablauf wird 0 zurückgegeben. Andernfalls wird \fBEOF\fP zurückgegben und \fIerrno\fP dem Fehler entsprechend gesetzt. .SH FEHLER .TP \fBEBADF\fP \fIdatenstrom\fP ist kein geöffneter Datenstrom oder nicht zum Schreiben geöffnet. .PP Die Funktion \fBfflush\fP() kann auch fehlschlagen und \fIerrno\fP für jeden Fehler setzen, die für \fBwrite\fP(2) spezifiziert wurden. .SH ATTRIBUTE Siehe \fBattributes\fP(7) für eine Erläuterung der in diesem Abschnitt verwandten Ausdrücke. .TS allbox; lb lb lb l l l. Schnittstelle Attribut Wert T{ \fBfflush\fP() T} Multithread\-Fähigkeit MT\-Safe .TE .SH "KONFORM ZU" C89, C99, POSIX.1\-2001, POSIX.1\-2008. POSIX.1\-2001 spezifizierte das Verhalten zum Leeren von Eingabedatenströmen nicht, das Verhalten wird aber in POSIX.1\-2008 spezifiziert. .SH ANMERKUNGEN Beachten Sie, dass \fBfflush\fP() nur die von der C\-Bibliothek bereitgestellten Puffer innerhalb des Prozesses leert. Um sicherzustellen, dass die Daten physisch auf der Platte gespeichert werden, müssen auch die Kernel\-Puffer geleert werden, beispielsweise mit \fBsync\fP(2) oder \fBfsync\fP(2). .SH "SIEHE AUCH" \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 KOLOPHON Diese Seite ist Teil der Veröffentlichung 4.09 des Projekts Linux\-\fIman\-pages\fP. Eine Beschreibung des Projekts, Informationen, wie Fehler gemeldet werden können sowie die aktuelle Version dieser Seite finden sich unter \%https://www.kernel.org/doc/man\-pages/. .SH ÜBERSETZUNG Die deutsche Übersetzung dieser Handbuchseite wurde von Martin Schulze und Chris Leick erstellt. Diese Übersetzung ist Freie Dokumentation; lesen Sie die GNU General Public License Version 3 oder neuer bezüglich der Copyright-Bedingungen. Es wird KEINE HAFTUNG übernommen. Wenn Sie Fehler in der Übersetzung dieser Handbuchseite finden, schicken Sie bitte eine E-Mail an .