From 6f1b6df0f9c2f6c6be345428b8865f7bf0751395 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Thu, 11 Aug 2016 17:54:00 +0100 Subject: [PATCH] Don't leak slave's main IO streams. --- econtext/core.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/econtext/core.py b/econtext/core.py index 9c2a4b3c..ac0bd364 100644 --- a/econtext/core.py +++ b/econtext/core.py @@ -376,6 +376,8 @@ class Stream(BasicStream): def Accept(self, rfd, wfd): self.read_side = Side(self, os.dup(rfd)) self.write_side = Side(self, os.dup(wfd)) + set_cloexec(self.read_side.fd) + set_cloexec(self.write_side.fd) self._context.stream = self def Connect(self):