Re: gtk_source_remove() hangs



>Then when the child dies and I catch the SIGCHLD, I do the following:

you'd better not be doing anything in the SIGCHLD handler. this has
long been a PITA of most X Window toolkits - its OK that POSIX says
you can't do anything really significant from a signal handler, but
its not OK that its so hard to find a way to handle whatever it was
that you did want to do. general solution typically involves an
in-process FIFO hooked into the g_main_event loop. from the signal
handler, write to one end of the FIFO; the handler within the event
loop will do the rest. its not pleasant.

at one time, there was talk of GTK adding XForms-like methods for
handling POSIX signals within the main event loop, but i don't think
it ever happened.

--p



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