Race condition with gnome-name-service



Hi, folks.

There seems to be a race condition when starting gnome-name-service.

Say, I have .Xclients like this:
----8<----
enlightenment &
exec gnome-session
----8<----
Session manager starts the name service and then the panel
and panel dies in goad_server_register(), since gnome_name_service_get()
returns CORBA_OBJECT_NIL. The attached patch fixes the problem (for me).

Regards,
-velco
Index: goad.c
===================================================================
RCS file: /cvs/gnome/gnome-libs/libgnorba/goad.c,v
retrieving revision 1.48.2.6
diff -u -r1.48.2.6 goad.c
--- goad.c	1998/12/30 09:04:45	1.48.2.6
+++ goad.c	1999/01/01 19:40:48
@@ -1021,8 +1021,10 @@
 
   CORBA_exception_free(ev);
 
-  if(name_server == CORBA_OBJECT_NIL)
-    name_server = gnome_name_service_get();
+  if( name_server == CORBA_OBJECT_NIL
+      && !((name_server = gnome_name_service_get()) 
+	   || (name_server = gnome_name_service_get())) )
+    return -2;
 
   old_server = CosNaming_NamingContext_resolve(name_server, &nom, ev);
 



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