.\" -*- 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 .\" .\" @(#)fclose.3 6.7 (Berkeley) 6/29/91 .\" .\" Converted for Linux, Mon Nov 29 15:19:14 1993, faith@cs.unc.edu .\" .\" Modified 2000-07-22 by Nicolás Lichtmaier .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH FCLOSE 3 "12 dezembro 2016" GNU "Manual do Programador do Linux" .SH NOME fclose \- fecha um fluxo .SH SINOPSE \fB#include \fP .PP \fBint fclose(ARQUIVO *\fP\fIstream\fP\fB);\fP .SH DESCRIÇÃO .\" Reviewed by upstream and rejected, May 2012, Debian#67239 The \fBfclose\fP() function flushes the stream pointed to by \fIstream\fP (writing any buffered output data using \fBfflush\fP(3)) and closes the underlying file descriptor. .PP .\" End of patch The behaviour of \fBfclose\fP() is undefined if the \fIstream\fP parameter is an illegal pointer, or is a descriptor already passed to a previous invocation of \fBfclose\fP(). .SH "VALOR DE RETORNO" Upon successful completion, 0 is returned. Otherwise, \fBEOF\fP is returned and \fIerrno\fP is set to indicate the error. In either case, any further access (including another call to \fBfclose\fP()) to the stream results in undefined behavior. .SH ERROS .TP \fBEBADF\fP .\" This error cannot occur unless you are mixing ANSI C stdio operations and .\" low-level file operations on the same stream. If you do get this error, .\" you must have closed the stream's low-level file descriptor using .\" something like close(fileno(stream)). O descritor do arquivo de \fIstream\fP não é válido. .PP A função \fBfclose\fP() pode também falhar e ajustar \fIerrno\fP para quaisquer dos erros especificados para as rotinas \fBclose\fP(2), \fBwrite\fP(2) ou \fBfflush\fP(3). .SH ATRIBUTOS Para uma explicação dos termos usados nesta seção, consulte \fBattributes\fP(7). .TS allbox; lb lb lb l l l. Interface Atributo Valor T{ \fBfclose\fP() T} Thread safety MT\-Safe .TE .SH "DE ACORDO COM" POSIX.1\-2001, POSIX.1\-2008, C89, C99. .SH NOTAS Note que \fBfclose\fP apenas descarrega os buffers de espaço do usuário fornecidos pela biblioteca do C. Para garantir que os dados estão fisicamente armazenados no disco, os buffers do kernel devem ser descarregados também, por exemplo, com \fBsync\fP(2) ou \fBfsync\fP(2). .SH "VEJA TAMBÉM" \fBclose\fP(2), \fBfcloseall\fP(3), \fBfflush\fP(3), \fBfileno\fP(3), \fBfopen\fP(3), \fBsetbuf\fP(3) .SH COLOFÃO Esta página faz parte da versão 5.10 do projeto Linux \fIman\-pages\fP. Uma descrição do projeto, informações sobre relatórios de bugs e a versão mais recente desta página podem ser encontradas em \%https://www.kernel.org/doc/man\-pages/. .PP .SH TRADUÇÃO A tradução para português brasileiro desta página man foi criada por Felipe M Pereira e André Luiz Fassone . .PP Esta tradução é uma documentação livre; leia a .UR https://www.gnu.org/licenses/gpl-3.0.html Licença Pública Geral GNU Versão 3 .UE ou posterior para as condições de direitos autorais. Nenhuma responsabilidade é aceita. .PP Se você encontrar algum erro na tradução desta página de manual, envie um e-mail para .MT debian-l10n-portuguese@lists.debian.org a lista de discussão de tradutores .ME .