From 65fcef2374f051afc1bc3bebebbd68cad0f908eb Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 23 Mar 2018 06:58:59 +0545 Subject: [PATCH] core: mark every side O_CLOEXEC Not sure why this wasn't done before, seems it should have always been this way, and can't see any reason it wasn't. Without it, many fds are leaked into at least .local() children. Closes #163. --- mitogen/core.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mitogen/core.py b/mitogen/core.py index ee7c5877..9e4f8268 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -666,6 +666,7 @@ class Side(object): self.stream = stream self.fd = fd self.keep_alive = keep_alive + set_cloexec(fd) set_nonblock(fd) def __repr__(self):