Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37742873
en ru br
Репозитории ALT
S:4.2.0-alt1
5.1: 3.2-alt1
4.1: 3.1-alt1.M41.1
4.0: 3.0-alt1
www.altlinux.org/Changes

Группа :: Графические оболочки/XFce
Пакет: xfce4-genmon-plugin

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 01_no-zombies.patch
Скачать


Description: fix processes ending up as zombies when run from genmon
Bug: http://bugzilla.xfce.org/show_bug.cgi?id=3896
Author: Steve Tyler <stephent98@hotmail.com>
diff -u a/main.c b/main.c
--- a/panel-plugin/main.c	2008-03-15 15:38:18.000000000 -0700
+++ b/panel-plugin/main.c	2008-04-16 12:46:22.000000000 -0700
@@ -32,6 +32,7 @@
 
 #include <libxfce4util/libxfce4util.h>
 #include <libxfcegui4/dialogs.h>
+#include <libxfcegui4/xfce-exec.h>
 #include <libxfce4panel/xfce-panel-plugin.h>
 #include <libxfce4panel/xfce-panel-convenience.h>
 
@@ -94,10 +95,18 @@
 {
     struct genmon_t *poPlugin = (genmon_t *) p_pvPlugin;
     struct monitor_t *poMonitor = &(poPlugin->oMonitor);
-    char result[256];
+    GError *error = NULL;
+
+	xfce_exec(poMonitor->onClickCmd, 0, 0, &error);
+    if (error) {
+        char first[256];
+        g_snprintf (first, sizeof(first), _("Could not run \"%s\""), poMonitor->onClickCmd);
+        xfce_message_dialog (NULL, _("Xfce Panel"), 
+                             GTK_STOCK_DIALOG_ERROR, first, error->message,
+                             GTK_STOCK_CLOSE, GTK_RESPONSE_OK, NULL);
+        g_error_free (error);
+    }
 
-    genmon_SpawnCmd (poMonitor->onClickCmd, result,
-        sizeof (poMonitor->onClickCmd), 0);
 }
 
 /**************************************************************/
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin