Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
需要fileno获取 FILE* 的文件描述符。
fileno
给定文件描述符编号,例如从返回的,如何获得 FILE* 的地址pipe?
pipe
文件 管
您想使用以下fdopen()功能:
fdopen()
FILE * file = fdopen(fd, "r");
所以你可以像这样结合使用它pipe:
FILE * file = fdopen(pipe(..,..), "r");