diff options
author | alfred <alfred@FreeBSD.org> | 2001-12-24 22:27:04 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2001-12-24 22:27:04 +0000 |
commit | 39b93da10a3731b4cbc361775f3af082bfd9036d (patch) | |
tree | f7885d1b505ab88dc9d325bd4cdcc57ae3625cb9 /bin/sh | |
parent | 854cfdfa97272554f2e0d47a5b3aae58a7d08da2 (diff) | |
download | FreeBSD-src-39b93da10a3731b4cbc361775f3af082bfd9036d.zip FreeBSD-src-39b93da10a3731b4cbc361775f3af082bfd9036d.tar.gz |
backout rev 1.14, it's breaking things.
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/redir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/redir.c b/bin/sh/redir.c index 8c05da9..ee893f4 100644 --- a/bin/sh/redir.c +++ b/bin/sh/redir.c @@ -145,8 +145,11 @@ again: } if (!try) { sv->renamed[fd] = i; + close(fd); } INTON; + } else { + close(fd); } if (fd == 0) fd0_redirected++; @@ -183,7 +186,6 @@ openredirect(redir, memory) error("cannot open %s: %s", fname, errmsg(errno, E_OPEN)); movefd: if (f != fd) { - close(fd); copyfd(f, fd); close(f); } |