Re: Handling Unix signals in a GTK+ application




You are absolutely right; mutexes /are/ useless from signal
handlers. It seems the only reasonable way is to use a pipe().

How about GAsyncQueue's?  They're supposed to be thread safe without the need of locking...  How about within 
a single thread?

Add a unix signal number in the signal handler, and suck it out again in a custom event source's prepare 
method.  The prepare method can return -1 for its timeout contribution, and true/false if there's something 
in the queue.


Fredderic

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!





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