When will fopen fail?

Stephen R. van den Berg berg at marvin.e17.physik.tu-muenchen.de
Fri Apr 19 18:31:24 AEST 1991


Tom Kovar writes:
>Mark William Hopkins writes:

>>   Assuming all the subdirectories are there and writeable (on UNIX or
>>MS-DOS), when does

>>		     FP = fopen("...", "w");

>>fail and return FP == NULL?

> ... file system full
> ... user quota exceeded
> ... file system mounted read only

Or no memory left (fopen does a malloc!)
--
Sincerely,                 berg at marvin.e17.physik.tu-muenchen.de
           Stephen R. van den Berg.
"I code it in 5 min, optimize it in 90 min, because it's so well optimized:
it runs in only 5 min.  Actually, most of the time I optimize programs."



More information about the Comp.lang.c mailing list