C Interview Questions and Answers

 

How can I increase the allowable number of simultaneously open files?

Q; I'm getting an error, ``Too many open files''. How can I increase
the allowable number of simultaneously open files?





A: There are typically at least two resource limitations on the number of simultaneously
open files: the number of low-level ``file descriptors'' or ``file handles''
available in the operating system, and the number of FILE structures available in
the stdio library. Both must be sufficient. Under MS-DOS systems, you can control
the number of operating system file handles with a line in CONFIG.SYS. Some compilers
come with instructions (and perhaps a source file or two) for increasing the number
of stdio FILE structures.

Posted by:Richards