diff --git a/plumbum/commands/base.py b/plumbum/commands/base.py index 8511ec33..716c87ba 100644 --- a/plumbum/commands/base.py +++ b/plumbum/commands/base.py @@ -400,6 +400,8 @@ def popen(self, args=(), **kwargs): dstproc = self.dstcmd.popen(**kwargs) # allow p1 to receive a SIGPIPE if p2 exits srcproc.stdout.close() + if srcproc.stderr: + srcproc.stderr.close() if srcproc.stdin and src_kwargs.get("stdin") != PIPE: srcproc.stdin.close() dstproc.srcproc = srcproc