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
SizeOfPipe()
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.
st_size
fstat()