Re: forking a new mainwindow from a module

On Fri, 6 May 2005 19:10:29 -0400
muppet <scott asofyet org> wrote:

On May 6, 2005, at 5:42 PM, zentara wrote:

Any ideas on what I can do to fix this?

What's happening is that the child is inheriting the X connection 
socket from the parent, and both the child and parent are trying to 
communicate over the same socket.  It blows up just like two threads 
trying to talk at the same time.

I presume that the Tk version didn't do that because it initializes X 
differently.  It works with other programs because they're not fighting 
for the same X connection.

Here's a minor hack of your module to exec itself in the child to force 
the socket to close.

Thanks for showing me that clever mechanism. I had to add a bit
of defined testing, but it works.

if ((defined  $ARGV[0]) and  ($ARGV[0] eq 'GMeM')){.......

Another snippet for the "ole bag-o-tricks" :-)

I'm not really a human, but I play one on earth.

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