hello all,

i've got some log file monitoring programs which currently use 
popen ("tail -f <filename>","r").  for several reasons i'd like to
switch to using select(...).  this is not working for me though.  i've
used select(...) successfully elsewhere, in socket code, and i 
don't see why it's not working here.  is there something special 
about disk files and select that i'm missing?

i'm aware of problems involving log rotation and getting stuck
monitoring old inodes when logging is happening in newly 
allocated inodes.  i can deal with that.  i'm just wondering if
there's any particular reason why select on disk files won't
work.

i realize that i could use swatch and similar programs but i prefer
to write my own programs for this.  i don't need the generality 
of swatch and family.

i've looked at the tail source code and while i've considered that
approach, i'd prefer to use select(...) or poll(....) {not tried poll yet}
to the read and sleep loop that tail uses.

thanks for any pointers.

tiger

-- 
Gerald Timothy Quimpo                     [EMAIL PROTECTED]  [EMAIL PROTECTED]
           Entia non sunt multiplicanda praetere necessitatem
                         Mene sakhet ur seveh
_
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