fork() and main_quit()

Hi there again,
[reposting because the previous post didn't make it]

When running a Gtk2 GUI which forks another process (which doesn't deal
with the GUI at all, just communicates via pipes), I found that if I
call Gtk2->main_quit() in the parent, it freezes the GUI for up to 30
seconds and then exits.

Same behaviour if I define a 'SIGINT' signal handler in the child (which
exits the child), which the parent triggers before shutdown. The only
way I found to resolve this is send a signal 9 (KILL) to the child
before the parent calls main_quit().

I should mention that I use "use Gtk2 -init;" before forking, so maybe
it gets confused because both parent and child have Gtk2 initialized?

Is there a better way to cleanly shut down?

-- Mike
Mike Schilli
b2b perlmeister com

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