# 基于文件描述符的I/O操作

文件描述符是Linux内核操作管理文件的一个索引值，由它来指定文件操作的对象。当某个进程打开一个现存文件或者创建一个新文件时，内核便向进程返回一个文件描述符。

* 文件描述 0 与进程的标准输入（standard input）相结合
* 文件描述 1 与进程的标准输出（standard output）相结合
* 文件描述 2 与进程的标准出错（standard error）相结合


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiaoxiami.gitbook.io/linux-server/wen-jian-cao-zuo/linux-di-ceng.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
