Re: Behaviour of lseek and fseek with append mode.

C Hanish Menon (hanish@innomedia.soft.net)
Fri, 22 Oct 1999 21:07:51 +0530


Hi Everyone

I already have identified the method you people have suggest. But I have a
SMALL PROBLEM as specified in my earlier mail (which part I am placing below)

i.e When I open a file in O_WRONLY|O_APPEND mode. Isn't it better that LSEEK
fail a -VE offset rather than succedding and telling me that its positioned
there and then Write ignoring it.
Or may be kernel shouldn't be doing too many such not serious error checking
But ATLEAST the LIBC calls fopen, fseek etc. should take care of it. May be I
am telling in the Wrong Mailing List, if so SORRY.

Its just a SUGGESTION. I know there are other more serious issues but I
thought I would just mention it so that LINUX is the Best OS in every terms in
that it won't even allow programmers make wrong assumptions.

> On Fri, 22 Oct 1999, C Hanish Menon wrote:
>
<SNIP HERE>
> > ******** OR ELSE MAY BE ATLEAST THIS CAN BE DONE*************
<SNIP HERE>
> >
> > I can achieve what I want with the existing Append behaviour, by rather not
> > using append mode but using write mode and initially setting the FILE_POINTER
> > to End_of_File so that I achieve what I want. But I still think that LSEEK
> > shouldn't mislead me by allowing me to position the FILE_POINTER where ever I
> > want when in APPEND | WRITE_ONLY mode followed by Write completely IGNORING
> > the FILE_POINTER.
> >

-- 
Keep :-)
HanishKVC

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/