diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/exec.c | 8 |
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index b2d87e6ca..ce8f578de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-02-17 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 28762: Src/exec.c: logic for closing coproc file descriptors + was wrong. + 2011-02-15 Frank Terbeck <ft@bewatermyfriend.org> * 28758: Functions/Misc/colors: work with non-default option sets. @@ -14207,5 +14212,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5198 $ +* $Revision: 1.5199 $ ***************************************************** diff --git a/Src/exec.c b/Src/exec.c index 4576fc031..11d37f1b3 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -3218,10 +3218,14 @@ execcmd(Estate state, int input, int output, int how, int last1) _exit(1); } closem(FDT_INTERNAL); - if (coprocin) + if (coprocin != -1) { zclose(coprocin); - if (coprocout) + coprocin = -1; + } + if (coprocout != -1) { zclose(coprocout); + coprocout = -1; + } #ifdef HAVE_GETRLIMIT if (!forked) setlimits(NULL); |