From 839a72de105b1f52f8c24d25212f1721f4870d6c Mon Sep 17 00:00:00 2001 From: "Barton E. Schaefer" Date: Sun, 31 Aug 2014 13:53:25 -0700 Subject: 33077: SHTTY = -1 when closing it in closem() --- Src/exec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/exec.c') 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 */ -- cgit v1.2.3