From 01e163ddd1afa14d64f432bacb967e9217010d38 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 6 May 2007 15:00:57 +1000 Subject: [EVAL] Use dup2 instead of copyfd in evalbackcmd Since we know that dup2 must succeed here we can call it directly. --- ChangeLog | 1 + src/eval.c | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98702d5..20c55d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,7 @@ * Removed unnecessary inclusion of redir.h from parser.c. * Invoke sh_error on error in copyfd. + * Use dup2 instead of copyfd in evalbackcmd. 2007-05-05 Herbert Xu diff --git a/src/eval.c b/src/eval.c index 07e7ee2..fed82d5 100644 --- a/src/eval.c +++ b/src/eval.c @@ -625,8 +625,7 @@ evalbackcmd(union node *n, struct backcmd *result) FORCEINTON; close(pip[0]); if (pip[1] != 1) { - close(1); - copyfd(pip[1], 1); + dup2(pip[1], 1); close(pip[1]); } eflag = 0; -- cgit 1.4.1 /'>summary refs log tree commit diff
Commit message (Collapse)Author
2021-01-20Generate tags for sh files in mtagsJune McEnroe
Only matches functions declared at the beginnings of lines, but I'm fine with that.
2021-01-20Add messy sh lexerJune McEnroe
Surprisingly seems to work for everything I looked at in my repos.
2021-01-20Add all target to git.causal.agency MakefileJune McEnroe
2021-01-20Remove Lua supportJune McEnroe
Lua support is unused and the dlsym fwrite/write hacks horrify me. Clean it up.
2021-01-20Fix tests for diff spansJune McEnroe
2021-01-20Avoid matching ':' in make tagsJune McEnroe
Otherwise a :: rule includes one of the ':'s in the tag name.
2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe
Otherwise the "id" in "void" matches for "void id".
2021-01-19Escape \ and / in mtags search patternsJune McEnroe
2021-01-20Use mtags in source-filterJune McEnroe
2021-01-19Add mtags to generate tags for make and mdocJune McEnroe
2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe
2021-01-19Don't use a pager if reading standard inputJune McEnroe
2021-01-19Support BSD make syntax and match *.amJune McEnroe
These don't really go together, but...
2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe
Otherwise it ends up going into Shell state.
2021-01-18Allow matching lexers using first input lineJune McEnroe