Re: GIOChannel Watch



On Thu, Jan 17, 2002 at 12:49:46AM -0700, Burra wrote:
How do I keep the g_io_watch from being called when there is no new data,
I know it's not suppose to get called when there is no data, but my app
runs at 99% cpu as the io_watch func gets called.

I am just tailing a log file... code is below... any help is much
appriciated.

If you look at the source code for tail then you will see that tail
stat's the size of the file every few milliseconds.  The select/poll
system calls do not offer the behavior you desire.  You must stat
the log file to see whether new data is available.

-- 
Victory to the Divine Mother!!         after all,
  http://sahajayoga.org                  http://why-compete.org



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]