diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-05-06 15:00:57 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-05-06 15:00:57 +1000 |
commit | 01e163ddd1afa14d64f432bacb967e9217010d38 (patch) | |
tree | af7d9608f64e21eefe594196bc389087f5178f72 /src | |
parent | [REDIR] Remove EMFILE special case (diff) | |
download | dash-01e163ddd1afa14d64f432bacb967e9217010d38.tar.gz dash-01e163ddd1afa14d64f432bacb967e9217010d38.zip |
[EVAL] Use dup2 instead of copyfd in evalbackcmd
Since we know that dup2 must succeed here we can call it directly.
Diffstat (limited to '')
-rw-r--r-- | src/eval.c | 3 |
1 files changed, 1 insertions, 2 deletions
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; |