阅读背景:

unistd.h read()正在读取更多数据然后被写入

来源:互联网 

I'm reading/writing data off of a named pipe. On the writing side it says that it's writing a constant 110 bytes. On the Reading side for the majority of time it says that it's reading 110 bytes which is correct, but other times it says its reading 220 bytes or 330 bytes. Which is right in the fact that when I print it out it's printing out the same message two or three times in a row within the same read(). In the code below for reading am I doing something wrong with the memset to clear the char? I can't think of any other way it's reading more then is being written unless something is left over in the buffer.I'm reading/writing data off of a named pipe. O




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

分享到: