diff options
author | Akos PASZTORY <ext-akos.pasztory@nokia.com> | 2009-11-13 09:30:09 +0200 |
---|---|---|
committer | Akos PASZTORY <ext-akos.pasztory@nokia.com> | 2009-11-13 09:30:23 +0200 |
commit | 8bd67d165d9aac90c330f8dadd16f0cce11de848 (patch) | |
tree | f26f99bf7d22406b83a776ce5a2396ab1776a76e /python | |
parent | ec9595e721a92addb227b61cd8d20525ccbedf33 (diff) |
the real cltool fix: make Popen close all unneeded fds
Otherwise subsequent children inherit them. And then closing them only in the
main process does not cause an EOF in the children (because all fds referring
to the pipe end have to be closed for that).
Diffstat (limited to 'python')
-rw-r--r-- | python/ContextKit/cltool.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/ContextKit/cltool.py b/python/ContextKit/cltool.py index b13d520f..5901ab25 100644 --- a/python/ContextKit/cltool.py +++ b/python/ContextKit/cltool.py @@ -66,7 +66,7 @@ class CLTool: def __init__(self, *cline): self.process = Popen(cline, stdin=PIPE, stdout=PIPE, stderr=STDOUT, - preexec_fn=self._preexec) + preexec_fn=self._preexec, close_fds=True) self.io = [] self.iolock = Lock() self.reader = Reader(self) |