Re: Behavior of lseek() on a fd opened with 'RDONLY' flag, when seeking goes beyond file size.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: palani saravanan <busybeesaravanan0072003@...>
Cc: <linux-kernel@...>
Date: Saturday, June 21, 2008 - 10:06 pm

palani saravanan wrote:

No, lseek does not permit negative file offsets, and should return
EINVAL in your example.  You may have discovered a bug.  For reference,
on my system lseek returns -1 and sets errno to EINVAL, as it should.

If you're running a recent kernel it might be worth looking closer into
this; for older kernels it's probably not worth the effort.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Behavior of lseek() on a fd opened with 'RDONLY' flag, w..., palani saravanan, (Sat Jun 21, 11:48 am)
Re: Behavior of lseek() on a fd opened with 'RDONLY' flag, w..., David Newall, (Sat Jun 21, 10:06 pm)