hi all,

does select work with disk files at all?  i think i might have posted this
same question to this same list, but that would have been two or more
years ago and the archives are still temporarily unavailable.

i want to open a bunch of log files and then basically sit waiting 
with select until any of them have anything written to them.
then i want to process the data and loop back to the select.

i've done this before with popen to tail.  that's a pain though, for
one thing, i don't dare do:  "killall tail" on that box :).  now i want 
to do what tail does, but inside my code.  

it seems thought that select doesnt work with disk files.  i've tried
with the buffered io functions (fopen, fgets).  the select doesn't work, 
it returns immediately even if no data is waiting to be read.

same thing with the unbuffered io functions (open, read, etc).

i could poll, i suppose, but that's so inelegant :).  i'd really love to
be able to use select.

tiger

-- 
Gerald Timothy Quimpo  gquimpo*hotmail.com tiger*sni*ph
http://bopolissimus.sni.ph
Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78"

    The difficult we do today.  The impossible takes a little longer.
--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to