diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-04 01:59:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2009-08-04 01:59:57 +0200 |
commit | 497a6ecd71745f28ec4dda3bfc1d1d6efddc3e18 (patch) | |
tree | d86f90ad9015b1dff67d9a3bd8234a0cd62c9d03 /src/Applet/Applet.cpp | |
parent | 1404fbfe4bf90d7f9dfe36deda484fe3e91b4472 (diff) | |
download | abrt-497a6ecd71745f28ec4dda3bfc1d1d6efddc3e18.tar.gz abrt-497a6ecd71745f28ec4dda3bfc1d1d6efddc3e18.tar.xz abrt-497a6ecd71745f28ec4dda3bfc1d1d6efddc3e18.zip |
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 <vda.linux@googlemail.com>
Diffstat (limited to 'src/Applet/Applet.cpp')
-rw-r--r-- | src/Applet/Applet.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Applet/Applet.cpp b/src/Applet/Applet.cpp index 3ae9b4a8..adcfb47d 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 <iostream> #include <dbus/dbus-shared.h> @@ -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; |