From 497a6ecd71745f28ec4dda3bfc1d1d6efddc3e18 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 4 Aug 2009 01:59:57 +0200 Subject: abrt-applet: set SIGCHLD to SIG_IGN to prevent zombies from gui Also, running abrt-gui via popen is definiely wrong. We were leaking a FILE! fixed now. Signed-off-by: Denys Vlasenko --- src/Applet/Applet.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Applet/Applet.cpp') diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index 3ae9b4a..adcfb47 100644 --- a/src/Applet/Applet.cpp +++ b/src/Applet/Applet.cpp @@ -16,7 +16,7 @@ with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + #include "CCApplet.h" #include #include @@ -42,6 +42,9 @@ int main(int argc, char **argv) gdk_threads_init(); gdk_threads_enter(); gtk_init(&argc,&argv); + /* prevent zombies when we spawn abrt-gui */ + signal(SIGCHLD, SIG_IGN); + /* move to the DBusClient::connect */ DBus::Glib::BusDispatcher dispatcher; /* this should bind the dispatcher with mainloop */ @@ -60,7 +63,7 @@ int main(int argc, char **argv) //applet is not running, so claim the name on the session bus session.request_name("com.redhat.abrt.applet"); } - + DBus::Connection conn = DBus::Connection::SystemBus(); applet = new CApplet(conn, CC_DBUS_PATH, CC_DBUS_NAME); applet->ConnectCrashHandler(crash_notify_cb); @@ -69,6 +72,7 @@ int main(int argc, char **argv) std::cout << "Daemon is not running" << std::endl; applet->Disable("Daemon is not running"); } + gtk_main(); gdk_threads_leave(); delete applet; -- cgit