阅读背景:

写入stdin并从stdout读取(UNIX / LINUX / C编程)

来源:互联网 

I was working on an assignment where a program took a file descriptor as an argument (generally from the parent in an exec call) and read from a file and wrote to a file descriptor, and in my testing, I realized that the program would work from the command-line and not give an error if I used 0, 1 or 2 as the file descriptor. That made sense to me except that I could write to stdin and have it show on the screen. I was working on an assignment where a program




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: