全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 File descriptor, open file description, offset?

又称: file descriptor · descriptor table · open file description · file offset

Definition 14.1 University Computer Science — Year 2 · 第 14 章 — Files, Pipes and Signals

A file descriptor is a small non-negative integer that a process uses to name a file it has opened; it indexes the process’s descriptor table, kept by the kernel. Each entry points to an open file description, a kernel object created by each successful open, which records the file, the access mode, and the file offset: the position where the next read or write starts. By convention descriptors 0, 1 and 2 are the standard input, output and error.

The three levels after offsets.c: descriptors 3 and 5 share one description, and so one offset; descriptor 4 has its own. Both descriptions lead to the same file.
The three levels after offsets.c: descriptors 3 and 5 share one description, and so one offset; descriptor 4 has its own. Both descriptions lead to the same file.
在原文中阅读 →