In C how can i get the size of a pipe file descriptor without using READ or Write?

584 Views Asked by At

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

0

There are 0 best solutions below