[Pkg-xfce-commits] r1960 - in goodies/xfce4-genmon-plugin/debian: . patches

corsac at alioth.debian.org corsac at alioth.debian.org
Tue Apr 29 06:34:04 UTC 2008


Author: corsac
Date: 2008-04-29 06:34:03 +0000 (Tue, 29 Apr 2008)
New Revision: 1960

Added:
   goodies/xfce4-genmon-plugin/debian/patches/02_close-unused-pipes.patch
Modified:
   goodies/xfce4-genmon-plugin/debian/changelog
Log:
debian/patches: 02_close-unused-pipes added, don't hang on non-finishing
processes.

Modified: goodies/xfce4-genmon-plugin/debian/changelog
===================================================================
--- goodies/xfce4-genmon-plugin/debian/changelog	2008-04-29 06:16:32 UTC (rev 1959)
+++ goodies/xfce4-genmon-plugin/debian/changelog	2008-04-29 06:34:03 UTC (rev 1960)
@@ -1,3 +1,10 @@
+xfce4-genmon-plugin (3.2-3) UNRELEASED; urgency=low
+
+  * debian/patches: 02_close-unused-pipes added, don't hang on non-finishing
+    processes.
+
+ -- Yves-Alexis Perez <corsac at debian.org>  Tue, 29 Apr 2008 08:33:17 +0200
+
 xfce4-genmon-plugin (3.2-2) unstable; urgency=low
 
   * debian/patches:

Added: goodies/xfce4-genmon-plugin/debian/patches/02_close-unused-pipes.patch
===================================================================
--- goodies/xfce4-genmon-plugin/debian/patches/02_close-unused-pipes.patch	                        (rev 0)
+++ goodies/xfce4-genmon-plugin/debian/patches/02_close-unused-pipes.patch	2008-04-29 06:34:03 UTC (rev 1960)
@@ -0,0 +1,33 @@
+--- xfce4-genmon-plugin-3.2.orig/panel-plugin/cmdspawn.c	2007-11-23 07:32:40.000000000 -0800
++++ xfce4-genmon-plugin-3.2.new2/panel-plugin/cmdspawn.c	2008-04-28 21:18:28.000000000 -0700
+@@ -184,6 +184,7 @@
+             return (-1);
+         case 0:
+             /* Redirect stdout/stderr to associated pipe's write-ends */
++            close(0); /* stdin is not used in child */
+             for (i = 0; i < OUT_ERR; i++) {
+                 j = i + 1; // stdout/stderr file descriptor
+                 close (j);
+@@ -199,6 +200,9 @@
+         exit (-1);
+     }
+ 
++    for (i = 0; i < OUT_ERR; i++)
++        close (aaiPipe[i][WR]); /* close write end of pipes in parent */
++
+     /* Wait for child completion */
+     if (wait == 1)
+     {
+@@ -231,10 +235,9 @@
+     }
+ 
+     End:
+-    /* Close created pipes */
++    /* Close read end of pipes */
+     for (i = 0; i < OUT_ERR; i++)
+-        for (j = 0; j < RD_WR; j++)
+-            close (aaiPipe[i][j]);
++        close (aaiPipe[i][RD]);
+ 
+     return (-fError);
+ }// Spawn()




More information about the Pkg-xfce-commits mailing list