How do I interpret errno from fopen()? errno = 24 in my case.
On my system (FreeBSD), that error code is 'too many open files'.
In programs, it's more friendly to call strerror(errno) and print
the string in an error message, or use perror(), than to print errno
in decimal.
Other ways to look up error codes include reading the <errno.h>
header file (on systems where it really is a file; it doesn't have
to be) and running "man errno".
Note that your error code refers to hitting a *per process* open
file limit, not a *system wide* open file limit. Do you keep opening
files and forget to close them ("file descriptor leak")? The
stingiest system I've seen with open files per-process allows 20
(including stdin, stdout, and stderr) and some allow a few thousand,
although if very many tried that, they'd hit the system-wide limit.
Gordon L. Burditt