Hi I would like to know if its possible to count the size of bytes of a pipe's content like the read function but without using read (I don't want to lose it's content just know the size). I tried using
struct stat sb;
fstat(fd,&sb);
and then using sb.st_size
but it doesn't seem to give me the right size with file descriptors of pipes