[tcsh/f13/master] Remove fork when tcsh processes backquotes

Vojtěch Vítek vvitek at fedoraproject.org
Tue Jan 25 16:44:03 UTC 2011


commit 197e9b17f8c8b30b2b39b7237b072568ec3f9a1e
Author: Vojtech Vitek (V-Teq) <vvitek at redhat.com>
Date:   Tue Jan 25 17:38:36 2011 +0100

    Remove fork when tcsh processes backquotes

 tcsh-6.17.00-extrafork.patch |   18 ++++++++++++++++++
 tcsh.spec                    |    5 +++++
 2 files changed, 23 insertions(+), 0 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(&paraml);
+ 	    t = syntax(paraml.next, &paraml, 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 023740a..4e2ff9c 100644
--- a/tcsh.spec
+++ b/tcsh.spec
@@ -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,8 @@ fi
 %{_mandir}/man1/*.1*
 
 %changelog
+- Remove fork when tcsh processes backquotes
+  Resolves: #594536
 - Fix testsuite
 - Ship README file
 


More information about the scm-commits mailing list