summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2014-08-31 13:53:25 -0700
committerBarton E. Schaefer <schaefer@zsh.org>2014-08-31 13:53:25 -0700
commit839a72de105b1f52f8c24d25212f1721f4870d6c (patch)
tree8d1c8e0d08f0d75a265dd796a44fc0c67dbd6ac5
parent5b57f28256d30ebb4a2a13e1128184aec32956de (diff)
downloadzsh-839a72de105b1f52f8c24d25212f1721f4870d6c.tar.gz
zsh-839a72de105b1f52f8c24d25212f1721f4870d6c.zip
33077: SHTTY = -1 when closing it in closem()
-rw-r--r--ChangeLog4
-rw-r--r--Src/exec.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 37d111d2e..74a025c09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-08-31 Barton E. Schaefer <schaefer@zsh.org>
+
+ * 33077: Src/exec.c: SHTTY = -1 when closing it in closem()
+
2014-08-30 Barton E. Schaefer <schaefer@zsh.org>
* 33070: Doc/Zsh/prompt.yo, Src/prompt.c: add %(e..) based on %e
diff --git a/Src/exec.c b/Src/exec.c
index 5ad957f98..bf50d0f32 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -3569,8 +3569,11 @@ closem(int how)
for (i = 10; i <= max_zsh_fd; i++)
if (fdtable[i] != FDT_UNUSED &&
- (how == FDT_UNUSED || fdtable[i] == how))
+ (how == FDT_UNUSED || fdtable[i] == how)) {
+ if (i == SHTTY)
+ SHTTY = -1;
zclose(i);
+ }
}
/* convert here document into a here string */