NULL};
CORBA_exception_init(&ev);
- orb=CORBA_ORB_init(&orb_argc,orb_argv,"orbit-local-orb",&ev);
+ /* libcaptive is single-threaded only, caller must lock it.
+ * If thread A spawned the sandbox while currently doing its own work
+ * and thread B calls the sandbox thread B waits on ORB_run()
+ * while the sandbox waits for the response of thread A ORB. Deadlock.
+ * "orbit-local-non-threaded-orb" requests thread unaware ORB.
+ */
+ orb=CORBA_ORB_init(&orb_argc,orb_argv,"orbit-local-non-threaded-orb",&ev);
if (orb==CORBA_OBJECT_NIL)
fatal("Cannot initialize CORBA ORB (CORBA_OBJECT_NIL): %m");
if (ev._major!=CORBA_NO_EXCEPTION)
CORBA_exception_init(evp);
/* Init 'orb' */
- *orbp=CORBA_ORB_init(&orb_argc,orb_argv,"orbit-local-orb",evp);
+ /* libcaptive is single-threaded only, caller must lock it.
+ * If thread A spawned the sandbox while currently doing its own work
+ * and thread B calls the sandbox thread B waits on ORB_run()
+ * while the sandbox waits for the response of thread A ORB. Deadlock.
+ * "orbit-local-non-threaded-orb" requests thread unaware ORB.
+ */
+ *orbp=CORBA_ORB_init(&orb_argc,orb_argv,"orbit-local-non-threaded-orb",evp);
g_return_val_if_fail(*orbp!=CORBA_OBJECT_NIL,FALSE);
g_return_val_if_fail(validate_CORBA_Environment(evp),FALSE);