file descriptor


file descriptor

(programming, operating system)An integer that identifies anopen file within a process. This number is obtained as aresult of opening a file. Operations which read, write, orclose a file would take the file descriptor as an inputparameter.

In many operating system implementations, file descriptorsare small integers which index a table of open files. InUnix, file descriptors 0, 1 and 2 correspond to thestandard input, standard output and standard error filesrespectively.

See file descriptor leak.