[tcsh] Remove fork when tcsh processes backquotes
vcrhonek
vcrhonek at fedoraproject.org
Wed Oct 6 08:30:42 UTC 2010
commit 6488642e9132b057cdd9be31a7b7b5164d8b5fa8
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Wed Oct 6 10:30:42 2010 +0200
Remove fork when tcsh processes backquotes
tcsh-6.17.00-extrafork.patch | 18 ++++++++++++++++++
tcsh.spec | 8 +++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/tcsh-6.17.00-extrafork.patch b/tcsh-6.17.00-extrafork.patch
new file mode 100644
index 0000000..206d94a
--- /dev/null
+++ b/tcsh-6.17.00-extrafork.patch
@@ -0,0 +1,18 @@
+diff -up tcsh-6.17.00/sh.glob.c.orig tcsh-6.17.00/sh.glob.c
+--- tcsh-6.17.00/sh.glob.c.orig 2010-10-06 10:27:21.015893878 +0200
++++ tcsh-6.17.00/sh.glob.c 2010-10-06 10:28:17.503914951 +0200
+@@ -881,11 +881,13 @@ backeval(struct blk_buf *bb, struct Strb
+ stderror(ERR_OLD);
+ alias(¶ml);
+ t = syntax(paraml.next, ¶ml, 0);
++ if (t == NULL)
++ return;
+ cleanup_push(t, syntax_cleanup);
+ /* The F_BACKQ flag must set so the job output is correct if
+ * printexitvalue is set. If it's not set, the job output
+ * will have "Exit N" appended where N is the exit status. */
+- t->t_dflg = F_BACKQ;
++ t->t_dflg = F_BACKQ|F_NOFORK;
+ if (seterr)
+ stderror(ERR_OLD);
+ #ifdef SIGTSTP
diff --git a/tcsh.spec b/tcsh.spec
index a00ca21..d0f6b88 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: 8%{?dist}
+Release: 9%{?dist}
License: BSD
Group: System Environment/Shells
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.00.tar.gz
@@ -26,6 +26,8 @@ Patch15: tcsh-6.17.00-history.patch
# Accepted by upstream:
Patch16: tcsh-6.17.00-printexitvalue.patch
Patch17: tcsh-6.17.00-testsuite.patch
+# Accepted by upstream:
+Patch18: tcsh-6.17.00-extrafork.patch
Provides: csh = %{version}
Requires(post): grep
Requires(postun): coreutils, grep
@@ -58,6 +60,7 @@ like syntax.
%patch15 -p1 -b .history
%patch16 -p1 -b .printexitvalue
%patch17 -p1 -b .testsuite
+%patch18 -p1 -b .extrafork
for i in Fixes WishList; do
iconv -f iso-8859-1 -t utf-8 "$i" > "${i}_" && \
@@ -131,6 +134,9 @@ fi
%{_mandir}/man1/*.1*
%changelog
+* Wed Oct 6 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 6.17-9
+- Remove fork when tcsh processes backquotes
+
* Wed Apr 14 2010 Vitezslav Crhonek <vcrhonek at redhat.com> - 6.17-8
- Fix testsuite
More information about the scm-commits
mailing list