Re: adding fifo input to the main glib2 loop
- From: Paul Davis <pbd op net>
- To: Ben Martin <monkeyiq users sourceforge net>
- Cc: gtk-list <gtk-list gnome org>
- Subject: Re: adding fifo input to the main glib2 loop
- Date: Fri, 06 Sep 2002 08:57:11 -0400
>Hi,
> I have an app that mkfifo()s && open()s and then attaches a
>g_io_channel to the fd. The basic idea is that clients can drop scheme
>code to a fifo for the app to execute, thus the server only reads the
>pipe and clients should only write it.
>
>I have this working with one catch, after the first command is read
>(first callback instance) the app itself goes to 100% CPU use. Other
>commands get through fine but from a break && bt it seems that glib2 is
>churning on some property of the fd (the break always stops in glib2s
>select (or poll, cant remember which it was)).
>
>Is there some condition that I must set or other thing required to
>monitor fifos? Or some app that folks know of that does fifo IO from the
>main loop.
there isn't anything extra. but are you sure you read *all* the data
that was available from the FIFO? is it possible that select/poll
believes there is still data available, and is repeatedly calling your
callback?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]