Re: A problem about programming with gtk+ in multiprocess.



Hy,

Is it possible so to free the memory of the child process of any Gtk
library? Has the memory is duplicate, this can be rather interesting to save
a bit of it...
Thanks,


Best regards,
---
Jean-Christophe Berthon


----- Original Message -----
From: "Paul Davis" <pbd Op Net>
To: <raise_sail sina com>
Cc: <gtk-list gnome org>
Sent: Sunday, December 16, 2001 5:45 PM
Subject: Re: A problem about programming with gtk+ in multiprocess.


> >hello all,
> >I have a problem when programming with gtk+ in multiprocess.
> >please look follow codes :
>
> what is is that has made some people think that this "fork, then have
> the parent and the child continue to use GTK+" will work?
>
> you cannot do this (reliably). X Window is inherently multithread
> safe, and since the child and parent both share the same connection to
> X server, using fork() rather than pthread_create() is just a detail
> that doesn't really change what is going on: two contexts of execution
> making parallel, unsynchronized requests to the X server on the same
> connection.
>
> we need to make it more clear that after fork(2), the child should never
> access GTK structures or functions unless the parent never does so
> again. can we add something to the FAQ about this?
>
> --p
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




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