标签: c posix stdin
我能理解为什么写入stdout和stderr会有输出,但为什么stdin?
#include <unistd.h> int main() { const char test[] = "test test test\n"; write(STDIN_FILENO, test, sizeof(test) - 1); return 0; }
编辑:对于那些想尝试一下的人,你可以compile and run the program here