Hi.

Attached is a small patch for Ecore DNS lookup.

When forking all queued atexits is copied as well.
This creates trouble in at least embrace, or rather Edb when the forked
dns lookup calls exit.
So, changed to a exit function that doesn't call all queued atexits.
Only tested with GNU libc.

Symptoms:
The forked children of embrace takes 100% CPU and (naturally) hogs the
system.
Have attached a backtrace after interrupting one of these children.
Only embrace was compiled with debug symbols.

Regards, Joel Klinghed
#1  0x00002aaaaabdea46 in __memp_mf_close () from /sw/edb/lib/libedb.so.1
#2  0x00002aaaaabde511 in memp_fclose () from /sw/edb/lib/libedb.so.1
#3  0x00002aaaaac1cc83 in __edb_close () from /sw/edb/lib/libedb.so.1
#4  0x00002aaaaac041e5 in __edb_nedbm_close () from /sw/edb/lib/libedb.so.1
#5  0x00002aaaaabd2d42 in _e_db_close () from /sw/edb/lib/libedb.so.1
#6  0x00002aaaaabd34b1 in e_db_flush () from /sw/edb/lib/libedb.so.1
#7  0x00002aaaad57527d in *__GI_exit (status=0) at exit.c:60
#8  0x00002aaaab28967f in ecore_con_dns_lookup ()
   from /sw/ecore/lib/libecore_con.so.1
#9  0x00002aaaab287954 in ecore_con_server_connect ()
   from /sw/ecore/lib/libecore_con.so.1
#10 0x00002aaab0df08d2 in imap_server_check (server=0x543e10) at imap.c:258
#11 0x00002aaab0df0945 in on_timer (udata=Variable "udata" is not available.
) at imap.c:282
#12 0x00002aaaad0ab030 in _ecore_timer_call () from /sw/ecore/lib/libecore.so.1
#13 0x00002aaaad0a877f in _ecore_main_loop_iterate_internal ()
   from /sw/ecore/lib/libecore.so.1
#14 0x00002aaaad0a7c8a in ecore_main_loop_begin ()
   from /sw/ecore/lib/libecore.so.1
#15 0x00000000004037b7 in main (argc=1, argv=Variable "argv" is not available.
) at main.c:82
Index: ecore/src/lib/ecore_con/ecore_con_dns.c
===================================================================
RCS file: /root/e17/libs/ecore/src/lib/ecore_con/ecore_con_dns.c,v
retrieving revision 1.1.1.2
diff -u -r1.1.1.2 ecore_con_dns.c
--- ecore/src/lib/ecore_con/ecore_con_dns.c     19 Jan 2006 09:36:42 
-00001.1.1.2
+++ ecore/src/lib/ecore_con/ecore_con_dns.c     11 Feb 2006 03:09:24 -0000
@@ -378,7 +378,11 @@
             write(fd[1], &(addr.s_addr), sizeof(in_addr_t));
          }
        close(fd[1]);
-       exit(0);
+#ifdef __USE_ISOC99
+       Exit(0);
+#else
+       _exit(0);
+#endif
      }
    /* PARENT */
    cbdata->handler = ecore_event_handler_add(ECORE_EXE_EVENT_DEL, 
_ecore_con_dns_exit_handler, cbdata);

Reply via email to