Re: kqueue, NOTE_EOF

2003-11-13 Thread Terry Lambert
Jaromir Dolecek wrote: > marius aamodt eriksen wrote: > > in order to be able to preserve consistent semantics across poll, > > select, and kqueue (EVFILT_READ), i propose the following change: on > > EVFILT_READ, add an fflag NOTE_EOF which will return when the file > > pointer *is* at the end of

Re: kqueue, NOTE_EOF

2003-11-13 Thread David Laight
> AFAIK yes for sockets, not for file descriptor (i.e. descriptor > open to a file on filesystem). Would poll() give you read-availability > event when on end of file on filesystem. IIRC poll() is required to report that files are always readable. (So tail -f can't use poll() to avoid looping.) T

Re: kqueue, NOTE_EOF

2003-11-13 Thread der Mouse
>> I think the difference is in the default behavior. When you're at >> EOF, I know that poll() will give you a read-availability event, so >> you'll read the EOF. Will kqueue? > AFAIK yes for sockets, not for file descriptor (i.e. descriptor open > to a file on filesystem). Would poll() give yo

Re: kqueue, NOTE_EOF

2003-11-13 Thread Jaromir Dolecek
Bill Studenmund wrote: > I think the difference is in the default behavior. When you're at EOF, I > know that poll() will give you a read-availability event, so you'll read > the EOF. Will kqueue? AFAIK yes for sockets, not for file descriptor (i.e. descriptor open to a file on filesystem). Woul

Re: kqueue, NOTE_EOF

2003-11-12 Thread John-Mark Gurney
marius aamodt eriksen wrote this message on Wed, Nov 12, 2003 at 14:06 -0500: > > >right - the idea was to preserve existing semantics, while leaving the > > >poll-like semantics optional. > > > > I'm not sure the "existing semantics" are anything more than a bug that > > should be fixed. > > th

Re: kqueue, NOTE_EOF

2003-11-12 Thread marius aamodt eriksen
* Jason Thorpe <[EMAIL PROTECTED]> [031112 14:00]: > On Nov 12, 2003, at 10:57 AM, marius aamodt eriksen wrote: > > >right - the idea was to preserve existing semantics, while leaving the > >poll-like semantics optional. > > I'm not sure the "existing semantics" are anything more than a bug that

Re: kqueue, NOTE_EOF

2003-11-12 Thread Jason Thorpe
On Nov 12, 2003, at 10:57 AM, marius aamodt eriksen wrote: right - the idea was to preserve existing semantics, while leaving the poll-like semantics optional. I'm not sure the "existing semantics" are anything more than a bug that should be fixed. -- Jason R. Thorpe <[EMAIL PROTECTED]>

Re: kqueue, NOTE_EOF

2003-11-12 Thread marius aamodt eriksen
* Jason Thorpe <[EMAIL PROTECTED]> [031112 13:54]: > On Nov 12, 2003, at 10:40 AM, marius aamodt eriksen wrote: > > >correct - this is the difference, kqueue will not yield any event at > >EOF. > > So, kqueue should simply be changed to report the event. I don't see > any need for a separate E

Re: kqueue, NOTE_EOF

2003-11-12 Thread Jason Thorpe
On Nov 12, 2003, at 10:40 AM, marius aamodt eriksen wrote: correct - this is the difference, kqueue will not yield any event at EOF. So, kqueue should simply be changed to report the event. I don't see any need for a separate EOF flag. EOF can simply be determined as normal in the kqueue case

Re: kqueue, NOTE_EOF

2003-11-12 Thread marius aamodt eriksen
* Bill Studenmund <[EMAIL PROTECTED]> [031112 12:27]: > > I'm not sure I understand what is the exact issue. > > I'm only responding to the notes also. > > > Why would this be necessary or what does this exactly solve? AFAIK > > poll() doesn't set any flags in this case neither, so I don't > > s

Re: kqueue, NOTE_EOF

2003-11-12 Thread Bill Studenmund
On Wed, Nov 12, 2003 at 09:58:15AM +0100, Jaromir Dolecek wrote: > marius aamodt eriksen wrote: > > hi - > > > > in order to be able to preserve consistent semantics across poll, > > select, and kqueue (EVFILT_READ), i propose the following change: on > > EVFILT_READ, add an fflag NOTE_EOF which

Re: kqueue, NOTE_EOF

2003-11-12 Thread Jaromir Dolecek
marius aamodt eriksen wrote: > hi - > > in order to be able to preserve consistent semantics across poll, > select, and kqueue (EVFILT_READ), i propose the following change: on > EVFILT_READ, add an fflag NOTE_EOF which will return when the file > pointer *is* at the end of the file (effectively