Bug 60395
| Summary: | stat() seems to return always size zero for any fifo (named pipe) | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Pedro Pascual <pedro.pascual> |
| Component: | kernel | Assignee: | Arjan van de Ven <arjanv> |
| Status: | CLOSED ERRATA | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.2 | CC: | ddjbolling |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i686 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2002-02-27 12:55:37 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Pedro Pascual
2002-02-27 12:50:07 UTC
stat() on a fifo is undefined as per POSIX and SUS standards. The value it had before was random, and due to a very serious kernel bug actually looked like something real. If you have software that depends on this you REALLY need to fix the software. REALLY. We can try to make it return a value that looks like something real again, maybe. But this "meaning" is actually without meaning since it depends on the current internal implementation on fifo's and that implementation will change soon. 2.4.9-31 will return some random value instead of 0 On Linux version 2.2.17-14 (RedHat 7.0), the stat always returned the actual number of unread bytes in the fifo (not a random value). We are now running Linux version 2.4.7-10 (RedHat 7.2) and the stat always returns a size of zero. If your explanation of the problem is accurate, how do we go about getting the number of unread bytes in the fifo before we do any reads on the fifo? Doug |