File: fflush.3

package info (click to toggle)
manpages-pl 1%3A0.7-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 22,276 kB
  • ctags: 7
  • sloc: sh: 112; makefile: 59; perl: 32
file content (133 lines) | stat: -rw-r--r-- 6,105 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
133
.\" 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 <nick@debian.org>
.\" Modified 2001-10-16 by John Levon <moz@compsoc.man.ac.uk>
.\"
.\"*******************************************************************
.\"
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
.\" This file is distributed under the same license as original manpage
.\" Copyright of the original manpage:
.\" Copyright © 1990,1991 The Regents of the University of California (BSD-4-clause)
.\" Copyright © of Polish translation:
.\" Adam Byrtek (PTM) <alpha@irc.pl>, 1998.
.\" Andrzej M. Krzysztofowicz (PTM) <ankry@green.mf.pg.gda.pl>, 2001.
.\" Robert Luberda <robert@debian.org>, 2017.
.TH FFLUSH 3 2015\-03\-02 GNU "Podręcznik programisty Linuksa"
.SH NAZWA
fflush \- wypróżnienie buforów strumienia
.SH SKŁADNIA
\fB#include <stdio.h>\fP
.sp
\fBint fflush(FILE *\fP\fIstream\fP\fB);\fP
.SH OPIS
Użyta na strumieniach wyjściowych funkcja \fBfflush\fP() wymusza zapis
wszystkich danych buforowanych w przestrzeni użytkownika dla danego wyjścia
lub aktualizację strumienia \fIstream\fP za pomocą należącej do niego funkcji
zapisu.

W przypadku strumieni wejściowych skojarzonych z plikami, po których można
się przesuwać (na przykład pliki dyskowe, ale nie potoki czy terminale)
\fBfflush\fP() usuwa wszelkie dane, które zostały odczytane z pliku, ale
jeszcze nie zostały pobrane przez aplikację.

Stan otwarcia strumienia nie jest zmieniany (tj. pozostaje on nadal
otwarty).
.PP
.\" mtk: POSIX specifies that only output streams are flushed for this case.
.\" Also verified for glibc by experiment.
Jeśli argument \fIstream\fP jest równy NULL, to \fBfflush\fP() wypróżnia
\fIwszystkie\fP otwarte strumienie wyjściowe.
.PP
Informacje o nieblokujących odpowiednikach znajdują się w
\fBunlocked_stdio\fP(3).
.SH "WARTOŚĆ ZWRACANA"
Jeśli funkcja zakończyła się pomyślnie, zwracane jest 0. W przeciwnym
przypadku zwracana jest wartość \fBEOF\fP, a \fIerrno\fP przyjmuje wartość
wskazującą na rodzaj błędu.
.SH BŁĘDY
.TP 
\fBEBADF\fP
\fIstream\fP nie jest otwartym strumieniem lub nie jest otwarty do zapisu.
.PP
Funkcja \fBfflush\fP() może także zawieść i ustawić wartość \fIerrno\fP na dowolny
błąd wymieniony określony dla \fBwrite\fP(2).
.SH ATRYBUTY
Informacje o pojęciach używanych w tym rozdziale można znaleźć w podręczniku
\fBattributes\fP(7).
.TS
allbox;
lb lb lb
l l l.
Interfejs	Atrybut	Wartość
T{
\fBfflush\fP()
T}	Bezpieczeństwo wątkowe	MT\-Safe
.TE
.SH "ZGODNE Z"
C89, C99, POSIX.1\-2001, POSIX.1\-2008.

POSIX.1\-2001 nie określa zachowania podczas opróżniania strumieni
wejściowych; zostało to opisane  w standardzie POSIX.1\-2008.
.SH UWAGI
Należy zauważyć, że \fBfflush\fP() opróżnia jedynie bufory w przestrzeni
użytkownika obsługiwane przez bibliotekę C. Aby upewnić się, że dane zostały
fizycznie zapisane na dysku, należy zrzucić również bufory jądra, np. za
pomocą \fBsync\fP(2) lub \fBfsync\fP(2).
.SH "ZOBACZ TAKŻE"
\fBfsync\fP(2), \fBsync\fP(2), \fBwrite\fP(2), \fBfclose\fP(3), \fBfopen\fP(3),
\fBsetbuf\fP(3), \fBunlocked_stdio\fP(3)
.SH "O STRONIE"
Angielska wersja tej strony pochodzi z wydania 4.07 projektu Linux
\fIman\-pages\fP. Opis projektu, informacje dotyczące zgłaszania błędów oraz
najnowszą wersję oryginału można znaleźć pod adresem
\%https://www.kernel.org/doc/man\-pages/.
.SH TŁUMACZENIE
Autorami polskiego tłumaczenia niniejszej strony podręcznika man są:
Adam Byrtek (PTM) <alpha@irc.pl>,
Andrzej M. Krzysztofowicz (PTM) <ankry@green.mf.pg.gda.pl>
i
Robert Luberda <robert@debian.org>.
.PP
Polskie tłumaczenie jest częścią projektu manpages-pl; uwagi, pomoc, zgłaszanie błędów na stronie http://sourceforge.net/projects/manpages-pl/. Jest zgodne z wersją \fB 4.07 \fPoryginału.