At 09:59 PM 12/23/01, fooler wrote:
>    select() and poll() belongs to state-based notification. files such as
>disk files (eg. /var/log/messages) are *always* ready for I/O, therefore,
>its state is always ready... even EOF or empty file (filesize is zero) of a
>given file returns its state as ready. 

aha. damn :).  yes, now i see that disk files are always
ready and so select will will always return immediately
even though there's no new data in the log.

thanks for pointing that out. heh, i guess i'll have to
do the tail thing (sleep and check the inode status).
ugly, but probably not very expensive.  

 >kqueue() is the same function as select() or poll() but 
 >extends its function, offers flexibility and scalability 
 >but not portability as of the moment... 

hmmm, i thought i'd do the kqueue thing because my log
monitoring thing will run on freebsd but then i just 
looked at the kqueue man page and i've decided that 
it's against my religion to use anything so
baroque.

i think i'll just go and cut and paste from tail :).

thanks again though.  good pointer.  merry christmas.

tiger
-- 
Gerald Timothy Quimpo                      [EMAIL PROTECTED]
Research, Development, Consulting          [EMAIL PROTECTED]
   Entia non sunt multiplicanda praetere necessitatem
                  Veritas liberabit vos

_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to