cvs commit: src/sys/sys filedesc.h

Joerg Sonnenberger joerg at
Tue Jun 21 12:38:53 PDT 2005

On Tue, Jun 21, 2005 at 10:59:47AM -0700, Matthew Dillon wrote:
>   Bump fd_lastfile, freefile, and refcnt to 32 bit ints.  Also bump cmask
>   (though that doesn't fix any particular bug).  lastfile and freefile were
>   previously unsigned shorts which caused the system to become very confused
>   when any single user process had more then 65535 open file descriptors.

I don't think it can happen with a single process having 64k open file
descriptors. It should hit resource limits much earlier. But it is
certainly possible for multiple processes to reach this limit. On the
other hand, that makes error handling kind of difficult, since e.g.
fork() should be able to trigger it.


More information about the Commits mailing list