2005-12-08 16:45:38

by Valentine Barshak

[permalink] [raw]
Subject: [PATCH] posix_fadvise bug (unexpected success on FIFO/pipe)

Hello, all.
I have the following problem with posix_fadvise :
the system call succeeds on a pipe or FIFO, although it has to fail with
ESPIPE (EINVAL on linux) return value.
Looks like a kernel bug.
I've attached a small test for posix_fadvise and a patch for linux
kernel 2.6.14 that fixes the problem.
The patch makes posix_fadvise return ESPIPE on FIFO/pipe in order to be
fully POSIX-compliant.
Please, take a look at these.
Thanks.


Attachments:
posix_fadvise_test.c (792.00 B)
fadv.patch (409.00 B)
Download all attachments