阅读背景:

为什么我使用read()时一次只能获得一个字符?

来源:互联网 

I connect the Tx and Rx of TTY directly,and i write a string to the TTY, then,i use read() expect to get the same string i wrote before. When i run the program, i find that i could write the whole string to the TTY one time, but i only could read one character at each time when i use read() later.Please help me figure out why this happen,and how can i solve this. The system i use is Ubuntu14.04, and the compiler is gcc 4.8.2.Thank you !I connect the Tx and Rx of TTY directly,and i w




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

分享到: