[459] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: gdk_fork() or the like ?
daemon@ATHENA.MIT.EDU (Ian Main)
Tue Jul 15 01:05:35 1997
Date: Mon, 14 Jul 1997 22:06:16 -0700 (PDT)
From: Ian Main <slow@intergate.bc.ca>
To: gtk-list@redhat.com
In-Reply-To: <199707081000.KAA01443@sierra.sci-park.uunet.pipex.com>
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
On Tue, 8 Jul 1997, Adam D. Moss wrote:
>
> Ian Main writes:
> > I'm just wandering what y'all think of a gtk/gdk (I figured gdk cause it's
> > not really a widget thing..) fork call that will create a child that has
> > no affiliation with X for doing multi-threaded programming.
>
> I have only minimally forked around with 'threaded' X, but I think
> that if you do an XSync just before you fork, then don't do anything
> Xy in the forked process, you're safe. I'm sure that someone will
> quicky correct me if I'm wrong. ;)
Hmm.. I took a look a the way the gimp does plugins, they fork(), and then
use _exit() when done (or on error). In my code, I fork off a process
(for dns lookup), it closes all it's fd's except for the pipes, and uses
_exit. No error messages so I'm happy :)
Just in case someone else was interested..
Ian
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null