[tcsh] - Fix incorrect $status value of pipelined commands Resolves: #638955 (Patch by Tomas Smetana <tsm
Vojtěch Vítek
vvitek at fedoraproject.org
Tue Jan 4 15:16:12 UTC 2011
commit 8cff7251da77ccef59261db8a326d030ae42c537
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date: Tue Dec 21 10:11:53 2010 +0100
- Fix incorrect $status value of pipelined commands
Resolves: #638955 (Patch by Tomas Smetana <tsmetana at redhat.com>)
tcsh-6.14.00-pipeexit.patch | 14 ++++++++++++++
tcsh.spec | 9 +++++++--
2 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/tcsh-6.14.00-pipeexit.patch b/tcsh-6.14.00-pipeexit.patch
new file mode 100644
index 0000000..62bae08
--- /dev/null
+++ b/tcsh-6.14.00-pipeexit.patch
@@ -0,0 +1,14 @@
+diff -up tcsh-6.14.00/sh.proc.c.pipeexec tcsh-6.14.00/sh.proc.c
+--- tcsh-6.14.00/sh.proc.c.pipeexec 2010-10-15 10:49:20.647126202 +0200
++++ tcsh-6.14.00/sh.proc.c 2010-10-15 13:25:51.203378381 +0200
+@@ -627,6 +627,10 @@ pjwait(pp)
+ reason = 0;
+ fp = pp;
+ do {
++ /* In case of pipelines only the result of the last
++ * command should be taken in account */
++ if ((fp->p_flags & PPOU) || (fp->p_flags & PBACKQ))
++ continue;
+ if (fp->p_reason)
+ reason = fp->p_flags & (PSIGNALED | PINTERRUPTED) ?
+ fp->p_reason | META : fp->p_reason;
diff --git a/tcsh.spec b/tcsh.spec
index 100503b..c642d22 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -3,7 +3,7 @@
Summary: An enhanced version of csh, the C shell
Name: tcsh
Version: 6.17
-Release: 9%{?dist}
+Release: 10%{?dist}
License: BSD
Group: System Environment/Shells
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.00.tar.gz
@@ -30,6 +30,8 @@ Patch17: tcsh-6.17.00-testsuite.patch
Patch18: tcsh-6.17.00-extrafork.patch
# Proposed to upstream: http://bugs.gw.com/view.php?id=109
Patch19: tcsh-6.17.00-wait-intr.patch
+# Proposed to upstream: http://bugs.gw.com/view.php?id=110
+Patch20: tcsh-6.14.00-pipeexit.patch
Provides: csh = %{version}
Requires(post): grep
Requires(postun): coreutils, grep
@@ -64,6 +66,7 @@ like syntax.
%patch17 -p1 -b .testsuite
%patch18 -p1 -b .extrafork
%patch19 -p1 -b .wait-intr
+%patch20 -p1 -b .pipeexit
for i in Fixes WishList; do
iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
@@ -137,9 +140,11 @@ fi
%{_mandir}/man1/*.1*
%changelog
-* Tue Dec 21 2010 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 6.17-10
+* Tue Jan 04 2011 Vojtech Vitek (V-Teq) <vvitek at redhat.com> - 6.17-10
- Make wait builtin command interruptible
Resolves: #440465
+- Fix incorrect $status value of pipelined commands
+ Resolves: #638955 (Patch by Tomas Smetana <tsmetana at redhat.com>)
* Wed Oct 6 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 6.17-9
- Remove fork when tcsh processes backquotes
More information about the scm-commits
mailing list