Репозитории ALT
S: | 4.2.0-alt1 |
5.1: | 3.2-alt1 |
4.1: | 3.1-alt1.M41.1 |
4.0: | 3.0-alt1 |
Группа :: Графические оболочки/XFce
Пакет: xfce4-genmon-plugin
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 02_close-unused-pipes.patch
Скачать
Скачать
Description: close unused pipes to prevent freezing the UI
Bug: http://bugzilla.xfce.org/show_bug.cgi?id=4036
Author: Steve Tyler <stephent98@hotmail.com>
--- 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()