OIT Logo
-

   Search
   Princeton University
   OIT Help Desk
   OIT Servers & Storage
  
     



h3>File Descriptors

A file descriptor is a handle created by a process when a file is opened. A new descriptor is created each time the file is opened. It is associated with a file object which includes information such as the mode in which the file was opened and the offset pointer where the next operation will begin. This information is called the context of the file.

File descriptors are retired when the file is closed or the process terminates. Opens always choose the lowest-numbered file descriptor available. Available file descriptors are allocated as follows:

  • rlim_fd_cur: It is dangerous to set this value higher than 256 due to limitations with the stdio library. If programs require more file descriptors, they should use setrlimit directly.

  • rlim_fd_max: It is dangerous to set this value higher than 1024 due to limitations with select. If programs require more file descriptors, they should use setrlimit directly.




Page © 2011 by the Trustees of Princeton University.
Content © 2011 by Scott Cromar, from The Solaris Troubleshooting Handbook. Used with permission.
Comments on the contents of this page may be logged to
The Solaris Troubleshooting Blog