From 39c1c26cdc38fe7dc79122c45bba7731b08ed1cd Mon Sep 17 00:00:00 2001 From: Bruno Abinader Date: Tue, 23 Dec 2008 21:50:13 +0000 Subject: [PATCH] Added SIGCHLD handling to avoid zombie processes. FIXES: - Added SIGCHLD handling to avoid zombie processes. Signed-off-by: Bruno Abinader Acked-by: Anderson Briglia git-svn-id: https://garage.maemo.org/svn/carman/branches/carman-0.7-beta2/python-purple@1730 596f6dd7-e928-0410-a184-9e12fd12cf7e --- purple.pyx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/purple.pyx b/purple.pyx index 5de7e43..17411e7 100644 --- a/purple.pyx +++ b/purple.pyx @@ -23,6 +23,7 @@ cdef extern from "c_purple.h": glib.guint glib_input_add(glib.gint fd, eventloop.PurpleInputCondition condition, eventloop.PurpleInputFunction function, glib.gpointer data) import ecore +import signal cdef glib.GHashTable *c_ui_info @@ -93,6 +94,12 @@ cdef class Purple: # adds glib iteration inside ecore main loop ecore.timer_add(0.001, self.__glib_iteration_when_idle) + # libpurple's built-in DNS resolution forks processes to perform + # blocking lookups without blocking the main process. It does not + # handle SIGCHLD itself, so if the UI does not you quickly get an army + # of zombie subprocesses marching around. + signal.signal(signal.SIGCHLD, signal.SIG_IGN) + def destroy(self): core.purple_core_quit() -- 1.7.9.5