|
|
我今天刚学写系统调用.用了一个read函数.
read(fipes[0],message,strlen(inbuf)+1);
puts(message);
结果显示是正确的.
[st1866@localhost st1866]$ gcc test.c
[st1866@localhost st1866]$ a.out
Only a test!
但改成
read(fipes[0],1,strlen(inbuf)+1);
或者read(fipes[0],stdout,strlen(inbuf)+1);
却没有任何显示.
[st1866@localhost st1866]$ a.out
[st1866@localhost st1866]$
直接超过了. |
|