diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-17 19:52:41 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2011-02-17 19:52:41 +0000 |
commit | 3a23e82941ce3b37b0eb2a1523928097756bc8ad (patch) | |
tree | ab2b30660969a8f1bad14ac46e78bdf1301b8424 /Src | |
parent | 9bfc05e3dba10929cf13dd7628bf8adac7d6345a (diff) | |
download | zsh-3a23e82941ce3b37b0eb2a1523928097756bc8ad.tar.gz zsh-3a23e82941ce3b37b0eb2a1523928097756bc8ad.tar.xz zsh-3a23e82941ce3b37b0eb2a1523928097756bc8ad.zip |
28762: fix coproc file desriptor closing
Diffstat (limited to 'Src')
-rw-r--r-- | Src/exec.c | 8 |
1 files changed, 6 insertions, 2 deletions
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); |