archive mirror
 help / color / mirror / Atom feed
* [BUG] stat.st_size is not set for pipes
@ 2001-06-13 11:56 Uwe Rathmann
  0 siblings, 0 replies; only message in thread
From: Uwe Rathmann @ 2001-06-13 11:56 UTC (permalink / raw)
  To: linux-kernel


I have upgraded from 2.4.2 to 2.4.5 and noticed a difference between the 
output of fstat() for pipes using the following testprogram:

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

    FILE *f;
    struct stat buf;
    int retval;

    f = popen("echo -n test", "r");
    retval = fstat(fileno(f), &buf);
    printf("Data: %d, %d\n", retval, buf.st_size );


Under 2.0.x, 2.2.x and 2.4.2 st_size reports the 4 bytes of the "test" 
string, 2.4.5 reports 0. 

Please CC to my email address also, as I'm not subscribed to the list. I 
checked the archives and hope I didn't miss a previous discussion of this.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-06-13 11:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-13 11:56 [BUG] stat.st_size is not set for pipes Uwe Rathmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).