On Sun, 2003-12-21 at 15:34, Michael Torrie wrote:
On Sun, 2003-12-21 at 15:27, Ryan McDougall wrote:Any help is appreciated!Afraid you'll need to post the source code. Can't do anything with just a binary.
My apologies!! I posted the binary by accident. *embarassed*
It would also help if you told us specifically what you want accomplish. Your description was a bit vague. My understanding of the glib event loop is that unless you have written a console driver (not the write word) to push events into the glib loop (much as gtk brings X11 events into the loop), you'll probably not be able to use the glib main event loop in the manner you are seeking. In other words you might have to use the old
My understanding is that I can define an arbitrary "source" of data events. Specifically all I want to do at this point is send events from stdin to stdout, similar to using select(2) to monitor stdin/out, but in Glib terms. Basically I want to the context to monitor those two files and call my signals when there is data to be read or written. I know how to do this via select(2), and I was under the impression that this is what the main loop was meant to do. Once again, if my ideas are on crack, Id love to see a doc that explains things better...
while (g_main_context_pending(context)) g_main_context_iteration(context, may_block) trick so that you can keep control of the program in your code. Remember that glib's event loop takes command. You're program flow is no longer linear. Typically console-based programs are intended to be linear. Michael
Thanks for you time Micheal!
Cheers, Ryan
Attachment:
main.c
Description: Text Data