摘自《Linux programming by example》(作者:Arnold Robbins)
A file descriptoris an integer value. Valid file descriptors start at 0 and go up to some system-defined limit.
These integers are in fact simple indexes into each process's table of open files. (This table is maintained inside theoperating system; it is not accessible to a running program.) On most modern systems, the size of the table is
large. The command 'ulimit -n' prints the value:
$ ulimit -n
1024