~cmiller/desktopcouch/segv-ya-rly

  • Committer: Chad Miller
  • Date: 2010-03-29 23:59:17 UTC
  • Revision ID: chad.miller@canonical.com-20100329235917-1dm6wj181cpbjeba
Since replication takes a long time (and we are not clever enough yet to 
replicate asynchronously), all replication is pushed into a subthread so
that don't block DBus server calls on getPort and such.

However, for some GUI libraries, GUI functions are not allowed to be outside
the main execution thread.  Violating that causes undefined behavior.

We need access to the keyring data in replication, and 'gnomekeyring' may
try to display an alert to the user, using GUI functions.  Doing so from 
inside the replication thread, outside the main thread, can cause SEGV 
crashes in deep and mysterious parts of Python and libraries it uses.

Now, add a wrapper for those functions that can call GUI functions.  First
test what environment we're in and if in a subthread, ask the twisted reactor
to run the target function in the main execution thread and return the values
down to the subthread.
Filename Latest Rev Last Changed Committer Comment Size
..
File desktopcouch-get-port 123.2.1 14 years ago Chad Miller Add new program to facilitate getting the communic 1.2 KB Diff Download File
File desktopcouch-pair 108.3.1 14 years ago stuart.langridge at canonical Patch from thomasvs in bug 489925 34.3 KB Diff Download File
File desktopcouch-service 123.3.13 14 years ago Chad Miller With help from james_w, avoid a race condition whe 4.6 KB Diff Download File
File desktopcouch-stop 132 14 years ago Elliot Murphy Fixed the execute bit on bin/desktopcouch-stop 853 bytes Diff Download File