Determine the size of a pipe without calling read()

后端 未结 13 931
无人共我
无人共我 2020-12-19 03:56

I need a function called SizeOfPipe() which should return the size of a pipe - I only want to know how much data is in the pipe and not actually read data off t

13条回答
  •  梦毁少年i
    2020-12-19 04:52

    Some UNIX implementations return the number of bytes that can be read in the st_size field after calling fstat(), but this is not portable.

提交回复
热议问题