Normally Windows does not limit local handles as long as system resources allow. However, C run time have default of 512 per process. In fact, handling even so much is not a good idea, and generally indicates a problem in program architecture. A simple solution may be pooling. In rare cases of inevitable need, such as concurrent multi channel operations, there is a pair of functions for use
int _getmaxstdio() and
Resource shortage may reveal itself as a failure to
open() request with
strerror(errno) to be
Too many open files. In Windows, it is usually possible to increase this value to 2048.
In Linux, we may see the system limit with
Increasing this requires modification of
nofile field in
Changes will be effective with new session / login.