fclose(3) Library Functions Manual fclose(3) fclose - LIBRARY Standard C library (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 ; GNU 3 , . . , , . Linux man-pages 6.06 31 2023 . fclose(3)