Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh We want this to work too:



details:   https://anonhg.NetBSD.org/src/rev/7167215da35f
branches:  trunk
changeset: 344114:7167215da35f
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Mar 13 15:57:30 2016 +0000

description:
We want this to work too:
        $ cat sep1
        #!/bin/sh
        { ./sep2; } 3>out

        $ cat sep2
        #!/bin/sh
        echo sep2 >&3

        $ ./sep1

diffstat:

 bin/sh/eval.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 8f1031c18363 -r 7167215da35f bin/sh/eval.c
--- a/bin/sh/eval.c     Sun Mar 13 10:07:22 2016 +0000
+++ b/bin/sh/eval.c     Sun Mar 13 15:57:30 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eval.c,v 1.117 2016/03/12 21:35:13 christos Exp $      */
+/*     $NetBSD: eval.c,v 1.118 2016/03/13 15:57:30 christos Exp $      */
 
 /*-
  * Copyright (c) 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)eval.c     8.9 (Berkeley) 6/8/95";
 #else
-__RCSID("$NetBSD: eval.c,v 1.117 2016/03/12 21:35:13 christos Exp $");
+__RCSID("$NetBSD: eval.c,v 1.118 2016/03/13 15:57:30 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -281,7 +281,7 @@
                break;
        case NREDIR:
                expredir(n->nredir.redirect);
-               redirect(n->nredir.redirect, REDIR_PUSH);
+               redirect(n->nredir.redirect, REDIR_PUSH | REDIR_KEEP);
                evaltree(n->nredir.n, flags);
                popredir();
                break;



Home | Main Index | Thread Index | Old Index