Sample Header Ad - 728x90

What is the referent of a file descriptor?

5 votes
3 answers
2183 views
My understanding is that a _file descriptor_ is an integer which is a key in the kernel's per-process mapping to objects such as open()ed files, pipes, sockets, etc. Is there a proper, short, and specific name for “open files/sockets/pipes/...”, the referents of file descriptors? Calling them “files” leads to confusion with unopened files stored in the file system. Simply referring to file descriptors does not adequately describe the semantics (e.g. copying *the integer* between processes is useless). Consulting [The Open Group Base Specifications](http://pubs.opengroup.org/onlinepubs/009695399/) and my own system's manpages leads me to the conclusion that the referent of a file descriptor is an _object_ and when it is specifically an open file it is, well, an _open file_. Is there a more specific term than _object_?
Asked by Kevin Reid (633 rep)
Apr 15, 2011, 11:52 AM
Last activity: Apr 29, 2024, 07:47 PM