Dialog box problem
- From: Allan Black <Allan Black Sun COM>
- To: gtk-list gnome org
- Subject: Dialog box problem
- Date: Thu, 01 May 2003 16:49:47 +0100
This is one of those rare occasions where I'm trying to use a
modal dialog box, and I'm stuck.
The dialog box is being run by g_main_iterate (actually from
gmome_dialog_run_and_close) and I'm getting a warning:
GLib-WARNING **: g_main_iterate(): main loop already active in another thread
which is normally symptomatic of trying to run a main loop
from a secondary thread (just like the message says :-).
However, I'm NOT. The dialog box is being created within a
UNIX signal handler, to allow me to deal gracefully with
things like seg faults. (I'm actually testing it with SIGINTR
a.k.a. Control-C, but the effect is the same).
What is happening, I believe, is that because the UNIX signal
handler is "called" by the kernel on receipt of the signal,
which occurs while g_main_poll is active (poll_waiting=TRUE),
the g_main code "mistakenly thinks" that I'm trying to start
a second main loop from a second thread. Sound reasonable?
In fact all I want to do is run a gtk_main_iteration() within
the same (and only) thread.
Can anyone think of a way around this?
Allan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]