Re: using gtk+ in a child process
- From: Chris Vine <chris cvine freeserve co uk>
- To: Luka Napotnik <luka napotnik gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: using gtk+ in a child process
- Date: Mon, 13 Oct 2008 10:13:09 +0100
On Mon, 13 Oct 2008 09:31:53 +0200
Luka Napotnik <luka napotnik gmail com> wrote:
Hello.
I have a GTK+ program that fork()-s and then in the child process
initializes a GTK+ widget and uses it. Is that a good thing to do or
should I init the GDK subsystem in the fork as well?
Does this work at all in your program - don't you get lots of X
asynchronous errors?
The best thing is to fork before doing anything with GTK+/GDK, and each
can initialise and use GTK+ separately in each process. You can
communicate between processes using pipes, for example.
If that does not suit what you are doing, then use threads.
Chris
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]