L
Lloyd Zusman
I have been experimenting with IO::Reactor to implement a multi-file
"tail -f". It works, but the `select' call that is made within
IO::Reactor returns immediately with a ":read" indication whether there
is new data to read at the end of the file or not [this is with
`poll(-1)']. Therefore, I can get my "tail -f" logic to work, but only
at the expense of lots of useless looping.
Is there something I can do to make the `select' call block at end
of file until new data appears, or is the behavior I'm seeing intrinsic
to `select' on a Unix system? I'm using FreeBSD, if that makes any
difference.
I have already successfully implemented a multi-file "tail -f" in ruby
using a different approach, and so I'm not looking for a solution to
that particular problem. I'm just experimenting with IO::Reactor and
I'm curious about this property of `select'.
Thanks in advance for any light that any of you can shed on this.
"tail -f". It works, but the `select' call that is made within
IO::Reactor returns immediately with a ":read" indication whether there
is new data to read at the end of the file or not [this is with
`poll(-1)']. Therefore, I can get my "tail -f" logic to work, but only
at the expense of lots of useless looping.
Is there something I can do to make the `select' call block at end
of file until new data appears, or is the behavior I'm seeing intrinsic
to `select' on a Unix system? I'm using FreeBSD, if that makes any
difference.
I have already successfully implemented a multi-file "tail -f" in ruby
using a different approach, and so I'm not looking for a solution to
that particular problem. I'm just experimenting with IO::Reactor and
I'm curious about this property of `select'.
Thanks in advance for any light that any of you can shed on this.