summaryrefslogtreecommitdiffstats
path: root/tcsh-6.17.00-extrafork.patch
diff options
context:
space:
mode:
authorVitezslav Crhonek <vcrhonek@redhat.com>2010-10-06 10:30:42 +0200
committerVitezslav Crhonek <vcrhonek@redhat.com>2010-10-06 10:30:42 +0200
commit6488642e9132b057cdd9be31a7b7b5164d8b5fa8 (patch)
treeabd2eeef1322857ef54e2b363991afa7feff6593 /tcsh-6.17.00-extrafork.patch
parent94e07816c693be69e7d293c3758ca33460361dcd (diff)
downloadtcsh-rebase-6.19.00-6488642e9132b057cdd9be31a7b7b5164d8b5fa8.tar.gz
tcsh-rebase-6.19.00-6488642e9132b057cdd9be31a7b7b5164d8b5fa8.tar.xz
tcsh-rebase-6.19.00-6488642e9132b057cdd9be31a7b7b5164d8b5fa8.zip
Remove fork when tcsh processes backquotes
Diffstat (limited to 'tcsh-6.17.00-extrafork.patch')
-rw-r--r--tcsh-6.17.00-extrafork.patch18
1 files changed, 18 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