Re: select() + gtk_main()



You should be able to use the gdk_input_add function to do this.  I think
you should be able to wait for a read condition and then do the accept()
without blocking.

James.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Sun, 26 Sep 1999, Sarel J. Botha wrote:

> 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
> 
> 
> -- 
> To unsubscribe: mail gnome-devel-list-request@gnome.org with "unsubscribe"
> as the Subject.
> 



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