From: Uwe Rathmann <Uwe.Rathmann@epost.de>
To: linux-kernel@vger.kernel.org
Subject: [BUG] stat.st_size is not set for pipes
Date: Wed, 13 Jun 2001 13:56:00 +0200 [thread overview]
Message-ID: <20010613115905Z263491-17720+3381@vger.kernel.org> (raw)
Hi,
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>
main()
{
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 );
pclose(f);
}
--------
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.
Uwe
reply other threads:[~2001-06-13 11:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010613115905Z263491-17720+3381@vger.kernel.org \
--to=uwe.rathmann@epost.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).