Re: gtk2-perl and fork()'ing



On Tue, 2004-01-20 at 06:46, Jens Luedicke wrote:
Hi ...

Are there any hints about accessing widgets
from a fork'd part of the program?

It seems to work, but after the fork'd
part finishes, the whole program crashes
with a X11 error.

Any advice?

if you're truly forking then you'd need to use plug/socket. if you're
using ithreads then there are a few rules that need to be followed for
various reasons (some of possibly addressed in the future, some out of
our hands.) if you're using fork look at plug.pl and socket.pl int the
examples directory. if you're using threads then have a look at
thread_usage.pl in the examples directory.

there's a FAQ entry about it too.

basically you can't (safely) access X from two treads at the same time
(this isn't a Gtk2 issue) and there's some cleanup ref counting issues
that are Gtk2's, that have yet to be resolved.

-rm




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