select() + gtk_main()



Hi everyone

I just started programming with GTK and can't figure out how to do the
following:

I need to wait for connections with select() and of course sit in
gtk_main(). I've thought of using something like this:

---
fork()
/* parent do this: */
gtk_main()
accept()

/* child sit in a select() until a connect, then send a signal to the
 * parent process to quit the gtk_main() loop and accept() the connect */
select()
kill()
---

If this is the way to do it, what signal should i send the gtk_main()
process. And is there maybe a better way to do it? (please say there is :)


Thanks all
-- 
SJ Botha         sjb@dundee.lia.net



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