Mask all signals in GLib worker thread
authorRyan Lortie <desrt@desrt.ca>
Fri, 14 Oct 2011 17:02:58 +0000 (13:02 -0400)
committerRyan Lortie <desrt@desrt.ca>
Sat, 15 Oct 2011 00:01:22 +0000 (20:01 -0400)
commit51773c6c64431c03242a6f3d12d44f99282c815c
treec998a3b3986e3cb3363aeb329c5d1aa4c1157c4c
parent1ed88f0615d1be4d629f3f1933ec5b249cb6429e
Mask all signals in GLib worker thread

Some code using GLib (gnome-keyring-daemon, for example) assumes that
they can catch signals by masking them out in the main thread and
calling sigwait() from a worker.

The problem is that our new worker thread catches the signals before
sigwait() has a chance and the default action occurs (typically
resulting in program termination).

If we mask all the signals in our worker, then this can't happen.
docs/reference/glib/tmpl/macros_misc.sgml
glib/gmain.c