官术网_书友最值得收藏!

File descriptors

All I/O–including files, pipes, and sockets - are handled by the kernel via a mechanism called the file descriptor. A file descriptor is a small, unsigned integer, which is an index into a file-descriptor table maintained by the kernel, and used by the kernel to reference open files and I/O streams. Each process inherits its own file-descriptor table from its parent. The first three file descriptors are 0, 1, and 2. File descriptor 0 is standard input (stdin), 1 is standard output (stdout), and 2 is standard error (stderr). When you open a file, the next available descriptor is 3, and it will be assigned to the new file.

主站蜘蛛池模板: 左云县| 河北区| 左云县| 婺源县| 美姑县| 贵阳市| 姚安县| 黄平县| 平定县| 合作市| 蓬溪县| 监利县| 老河口市| 华阴市| 峨眉山市| 临邑县| 抚松县| 遵义县| 莱芜市| 阜平县| 普安县| 靖宇县| 泰和县| 牙克石市| 普格县| 崇信县| 洞头县| 萨迦县| 巴彦淖尔市| 凤山市| 青阳县| 龙州县| 东乡族自治县| 清流县| 海阳市| 孟州市| 中卫市| 隆子县| 塘沽区| 论坛| 苏尼特右旗|