fclose(3) Library Functions Manual fclose(3) fclose - C (libc, -lc) #include int fclose(FILE *stream); fclose() (flushes) , stream ( fflush(3)) . . EOF errno . , ( fclose()) . EBADF stream . fclose() errno , close(2), write(2) fflush(3). attributes(7). +----------------------------+----------------------------------------------------------+--------------------------+ | | | | +----------------------------+----------------------------------------------------------+--------------------------+ |fclose() | | MT-Safe | +----------------------------+----------------------------------------------------------+--------------------------+ C11, POSIX.1-2008. C89, POSIX.1-2001. , fclose() , . , , , , sync(2) fsync(2). close(2), fcloseall(3), fflush(3), fileno(3), fopen(3), setbuf(3) () Azamat Hackimov , Dmitry Bolkhovskikh , Yuri Kozlov , Kirill Rekhov ; GNU (GNU General Public License - GPL, 3 ) , - . - , , () () () <>. Linux 6.15 17 2025 . fclose(3)