Tra*_*iet 2 stdout stdin stderr
我读过提到标准输入/输出/错误的书籍/教程。我的理解是:
My question: if there's the standard, what is the non-standard input/output/error of a process in Linux?
文件描述符0,1和默认提供2时的处理exec
ED和相关联stdin
,stdout
和stderr
。如果进程需要额外的 I/O 通道,它会打开从 3 开始的非标准文件描述符。
对于 1.:是的
对于 2.:对于不重定向 I/O 的交互式进程来说是这样。其他进程(例如cron
作业)可能有不同的关联。