fflush(3) Library Functions Manual fflush(3) NOME fflush - descarrega um fluxo BIBLIOTECA Biblioteca C Padrao (libc, -lc) SINOPSE #include int fflush(FILE *_Nullable stream); DESCRICAO For output streams, fflush() forces a write of all user-space buffered data for the given output or update stream via the stream's underlying write function. For input streams associated with seekable files (e.g., disk files, but not pipes or terminals), fflush() discards any buffered data that has been fetched from the underlying file, but has not been consumed by the application. The open status of the stream is unaffected. Se o argumento stream e NULO, fflush() descarrega todas os fluxos de saida abertas. Para uma contraparte nao-bloqueante, veja unlocked_stdio(3). VALOR DE RETORNO Upon successful completion 0 is returned. Otherwise, EOF is returned and errno is set to indicate the error. ERROS EBADF stream nao e um fluxo aberto, ou nao esta aberto para gravacao. The function fflush() may also fail and set errno for any of the errors specified for write(2). ATRIBUTOS Para uma explicacao dos termos usados nesta secao, consulte attributes(7). +--------------------------------------------+---------------+---------+ |Interface | Atributo | Valor | +--------------------------------------------+---------------+---------+ |fflush() | Thread safety | MT-Safe | +--------------------------------------------+---------------+---------+ PADROES C11, POSIX.1-2008. HISTORICO C89, POSIX.1-2001, POSIX.1-2008. POSIX.1-2001 did not specify the behavior for flushing of input streams, but the behavior is specified in POSIX.1-2008. NOTAS Note que fflush() apenas descarrega os buffers de espaco do usuario fornecidos pela biblioteca do C. Para garantir que os dados estao fisicamente armazenados no disco, os buffers do kernel devem ser descarregados tambem, por exemplo, com sync(2) ou fsync(2). VEJA TAMBEM fsync(2), sync(2), write(2), fclose(3), fileno(3), fopen(3), fpurge(3), setbuf(3), unlocked_stdio(3) TRADUCAO A traducao para portugues brasileiro desta pagina man foi criada por Felipe M Pereira e Andre Luiz Fassone Esta traducao e uma documentacao livre; leia a Licenca Publica Geral GNU Versao 3 ou posterior para as condicoes de direitos autorais. Nenhuma responsabilidade e aceita. Se voce encontrar algum erro na traducao desta pagina de manual, envie um e-mail para a lista de discussao de tradutores . Linux man-pages 6.06 31 outubro 2023 fflush(3)