]> rtime.felk.cvut.cz Git - frescor/forb.git/commitdiff
Do not destroy forb automatically on exit
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jun 2010 14:08:38 +0000 (16:08 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 18 Jun 2010 14:08:38 +0000 (16:08 +0200)
I do not know how to deregister the exit handler which is needed if
forb_destroy() is called manually. If the handler is not deregister
we get double free error.

src/forb.c

index 4827628190478a55e76ae36f0e04c5f49912640e..84d9def1cbd0a399b2b661ae881aa4da83be32f3 100644 (file)
@@ -99,12 +99,14 @@ static int init_ul_log(void);
 
 UL_LOGREG_DOMAINS_INIT_FUNCTION(forb_logreg_domains, forb_logreg_domains_array);
 
+#if 0
 static void
 destroy_forb_on_exit(int exitcode, void *arg)
 {
        forb_orb orb = arg;
        forb_destroy(orb);
 }
+#endif
 
 static void
 forb_is_alive(forb_orb _obj, CORBA_Environment *ev)
@@ -234,8 +236,10 @@ forb_init(int *argc, char **argv[], const struct forb_init_attr *attr)
                                 forb_execution_thread, orb);
        if (ret != 0)
                goto err2;
-       
-       on_exit(destroy_forb_on_exit, orb);
+
+       /* FIXME: I do not know how to deregister the exit handler if
+        * forb_destroy() is called manually. */
+       /* on_exit(destroy_forb_on_exit, orb); */
 
 #ifdef CONFIG_FORB_PROTO_UNIX
        {