dean gaudet 7d95c8f27d [PATCH] fcntl F_SETFL and read-only IS_APPEND files
There is code in setfl() which attempts to preserve the O_APPEND flag on
IS_APPEND files...  however IS_APPEND files could also be opened O_RDONLY
and in that case setfl() should not require O_APPEND...

coreutils 5.93 tail -f attempts to set O_NONBLOCK even on regular files...
unfortunately if you try this on an append-only log file the result is
this:

fcntl64(3, F_GETFL)                     = 0x8000 (flags O_RDONLY|O_LARGEFILE)
fcntl64(3, F_SETFL, O_RDONLY|O_NONBLOCK|O_LARGEFILE) = -1 EPERM (Operation not permitted)

I offer up the patch below as one way of fixing the problem...  i've tested
it fixes the problem with tail -f but haven't really tested beyond that.

(I also reported the coreutils bug upstream... it shouldn't fail imho...
<https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=15473>)

Signed-off-by: dean gaudet <dean@arctic.org>
Cc: Al Viro <viro@ftp.linux.org.uk>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-02-03 08:32:07 -08:00
..
2006-01-11 18:42:13 -08:00
2006-01-14 18:25:19 -08:00
2005-11-08 16:54:53 +01:00
2005-10-04 13:22:01 -07:00
2006-01-27 18:36:11 -08:00
2006-01-11 18:42:13 -08:00
2006-01-18 19:20:23 -08:00
2006-01-18 19:20:16 -08:00
2006-01-11 18:42:13 -08:00
2005-05-05 16:36:47 -07:00
2006-01-11 18:42:13 -08:00
2005-11-07 07:54:06 -08:00
2006-02-01 08:53:09 -08:00
2006-01-11 18:42:13 -08:00
2006-01-11 18:42:13 -08:00
2006-02-03 08:32:04 -08:00
2006-01-08 20:13:48 -08:00
2006-01-11 18:42:13 -08:00
2005-05-05 16:36:47 -07:00
2006-01-10 08:01:25 -08:00
2005-04-16 15:20:36 -07:00
2005-04-16 15:20:36 -07:00
2006-01-31 15:24:34 +01:00
2006-01-11 18:42:13 -08:00
2005-04-16 15:20:36 -07:00
2006-01-11 18:42:13 -08:00
2006-01-08 20:12:40 -08:00
2006-01-18 19:20:29 -08:00
2005-10-30 17:37:32 -08:00
2006-01-11 18:42:13 -08:00
2006-01-11 18:42:13 -08:00
2006-01-16 23:15:29 -08:00
2006-01-18 19:20:30 -08:00
2006-01-18 19:20:29 -08:00
2006-01-08 20:13:56 -08:00
2005-11-07 18:18:11 -08:00
2005-04-16 15:20:36 -07:00
2006-01-11 18:42:13 -08:00
2006-01-18 19:20:29 -08:00
2005-04-16 15:20:36 -07:00