2005-12-06 20:35:07

by Valentine Barshak

[permalink] [raw]
Subject: posix_fadvise succeeds on FIFO.

Hello all.
The following issue has been found with posix_fadvise:
the system call succeeds on a pipe or FIFO, although it has to fail with
EINVAL return value on linux.
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. Is it really a bug in kernel?
Thanks.


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