Re: g_main_context_prepare(): main loop already active in another thread



On Tue, 2005-06-14 at 13:03 +0200, Colossus wrote:
Hi,

I red the gtk_threads html page. I put the pair gdk_threads_enter() / 
gdk_threads_leave() inside a function outside the gtk_main loop as 
showed below:

void signalhandler (int signum)
{
      int status;
      waitpid ( -1, &status, WNOHANG );
      gdk_threads_enter();

The *only* thing you are allowed to do in a signal handler is call a
very limited set of C library functions. You certainly can't make
GTK+ calls from a signal handler.

You might want to use the "child watch" functionality of GLib.

Regards,
                                                Owen



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