r21691 - gnucash/branches/2.4/src/gnc-module - [21665]Bug #661383 - GnuCash segfault on Linux (Fedora 16 beta) because of

Geert Janssens gjanssens at code.gnucash.org
Thu Dec 8 12:19:24 EST 2011


Author: gjanssens
Date: 2011-12-08 12:19:24 -0500 (Thu, 08 Dec 2011)
New Revision: 21691
Trac: http://svn.gnucash.org/trac/changeset/21691

Modified:
   gnucash/branches/2.4/src/gnc-module/gnc-module.c
Log:
[21665]Bug #661383 - GnuCash segfault on Linux (Fedora 16 beta) because of
shared library load / unload weirdness

Modified: gnucash/branches/2.4/src/gnc-module/gnc-module.c
===================================================================
--- gnucash/branches/2.4/src/gnc-module/gnc-module.c	2011-12-08 17:11:52 UTC (rev 21690)
+++ gnucash/branches/2.4/src/gnc-module/gnc-module.c	2011-12-08 17:19:24 UTC (rev 21691)
@@ -279,7 +279,7 @@
     gchar * (* f_descrip)(void);
 
     /*   g_debug("(init) dlopening '%s'\n", fullpath); */
-    gmodule = g_module_open(fullpath, G_MODULE_BIND_MASK);
+    gmodule = g_module_open(fullpath, G_MODULE_BIND_LAZY);
     if (gmodule == NULL)
     {
         g_warning("Failed to dlopen() '%s': %s\n", fullpath, g_module_error());
@@ -323,7 +323,7 @@
     info->module_age         = *(int *)age;
     info->module_revision    = *(int *)revision;
 
-
+    g_module_make_resident(gmodule);
 get_info_close:
     /*   g_debug("(init) closing '%s'\n", fullpath); */
     g_module_close(gmodule);



More information about the gnucash-changes mailing list