[tcsh/f14/master] Avoid infinite loop pendjob()-xprintf() when stdout is closed Resolves: #690356

Vojtěch Vítek vvitek at fedoraproject.org
Thu Mar 24 15:28:01 UTC 2011


commit 0dca15d319a33853acade74dafba8a9d2a851369
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date:   Thu Mar 24 16:07:23 2011 +0100

    Avoid infinite loop pendjob()-xprintf() when stdout is closed
    Resolves: #690356

 ...17.00-avoid-infinite-loop-pendjob-xprintf.patch |   10 ++++++++++
 tcsh.spec                                          |    6 ++++++
 2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/tcsh-6.17.00-avoid-infinite-loop-pendjob-xprintf.patch b/tcsh-6.17.00-avoid-infinite-loop-pendjob-xprintf.patch
new file mode 100644
index 0000000..b762421
--- /dev/null
+++ b/tcsh-6.17.00-avoid-infinite-loop-pendjob-xprintf.patch
@@ -0,0 +1,10 @@
+--- tcsh-6.17.00/sh.proc.c.orig	2011-02-03 12:31:14.000000000 -0700
++++ tcsh-6.17.00/sh.proc.c	2011-02-03 12:32:00.000000000 -0700
+@@ -910,6 +910,7 @@
+ 
+     if (pcurrjob && (pcurrjob->p_flags & (PFOREGND | PSTOPPED)) == 0) {
+ 	pp = pcurrjob;
++	pcurrjob = 0;
+ 	while (pp->p_procid != pp->p_jobid)
+ 	    pp = pp->p_friends;
+ 	xprintf("[%d]", pp->p_index);
diff --git a/tcsh.spec b/tcsh.spec
index e99252a..3a1a819 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -36,6 +36,8 @@ Patch21: tcsh-6.17.00-dont-set-empty-remotehost.patch
 Patch22: tcsh-6.17.00-dont-print-history-on-verbose.patch
 # Accepted by upstream (tcsh-6.17.03b http://bugs.gw.com/view.php?id=113):
 Patch23: tcsh-6.17.00-variable-names.patch
+# Accepted by upstream (tcsh-6.17.05b http://mx.gw.com/pipermail/tcsh-bugs/2011-March/000727.html):
+Patch24: tcsh-6.17.00-avoid-infinite-loop-pendjob-xprintf.patch
 Provides: csh = %{version}
 Requires(post): grep
 Requires(postun): coreutils, grep
@@ -73,6 +75,7 @@ like syntax.
 %patch21 -p1 -b .dont-set-empty-remotehost
 %patch22 -p1 -b .dont-print-history-on-verbose
 %patch23 -p1 -b .variable-names
+%patch24 -p1 -b .avoid-infinite-loop-pendjob-xprintf
 
 for i in Fixes WishList; do
  iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
@@ -146,6 +149,9 @@ fi
 %{_mandir}/man1/*.1*
 
 %changelog
+- Avoid infinite loop pendjob()-xprintf() when stdout is closed
+  Resolves: #690356
+
 * Fri Jan 28 2011 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 6.17-11
 - Modify verbose patch to match with upstream (don't print on history -S)
   Resolves: #672810


More information about the scm-commits mailing list