how to avoid fflush after fclose?

Ron Natalie ron at topaz.rutgers.edu
Sat Apr 2 08:45:24 AEST 1988


fflush() is supposed to return EOF if the file is closed, even on UNIX.
You get what you ask for.  You're lucky you don't get screwed on UNIX, many
stdio implementations dump core when you pass them a bogus file pointer.

Why not recode your program such that it works properly and not attempt
to use file pointers that have been closed?

-Ron



More information about the Comp.unix.questions mailing list