diff options
-rw-r--r-- | Src/exec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Src/exec.c b/Src/exec.c index 7993af2da..69a34254e 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -1908,7 +1908,10 @@ execcmd(Cmd cmd, int input, int output, int how, int last1) case MERGEOUT: if (fn->fd2 < 10) closemn(mfds, fn->fd2); - if (fn->fd2 > 9 && fdtable[fn->fd2]) { + if (fn->fd2 > 9 && + (fdtable[fn->fd2] || + fn->fd2 == coprocin || + fn->fd2 == coprocout)) { fil = -1; errno = EBADF; } else { |