FCLOSEALL(3)

NAME
fcloseall, _fcloseall_r - close all files

SYNOPSIS

#include <stdio.h>

int fcloseall(void);

int _fcloseall_r(struct _reent *ptr);

DESCRIPTION

fcloseall closes all files in the current reentrancy struct's domain. The function _fcloseall_r is the same function, except the reentrancy struct is passed in as the ptr argument.

This function is not recommended as it closes all streams, including the std streams.

RETURNS

fclose returns 0 if all closes are successful. Otherwise, EOF is returned.

PORTABILITY

fcloseall is a glibc extension.

Required OS subroutines: close, fstat, isatty, lseek, read, sbrk, write.