[Previous]
[Contents]
[Next]

fcloseall()

close all open stream files, except stdin, stdout and stderr

Synopsis:

#include <stdio.h>
int fcloseall( void );

Description:

The fcloseall() function closes all open stream files, except stdin, stdout and stderr. This includes streams created (and not yet closed) by fdopen(), fopen() and freopen().

Returns:

The number of streams that were closed, or EOF if an error occurred.

Examples:

#include <stdio.h>

void main()
  {
    printf( "The number of files closed is %d\n",
        fcloseall() );
  }

Classification:

WATCOM

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

fclose(), fdopen(), fopen(), freopen(), _fsopen()


[Previous]
[Contents]
[Next]