changeset 5732:109f7b6471af

SubProcess: make sure files are closed at the end (experimental change)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 28 Nov 2010 16:55:46 +0100
parents 8692137f2ccc
children 4ca7ca278669
files MoinMoin/util/SubProcess.py
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/SubProcess.py	Fri Nov 26 21:21:16 2010 +0100
+++ b/MoinMoin/util/SubProcess.py	Sun Nov 28 16:55:46 2010 +0100
@@ -224,6 +224,14 @@
                 self.kill()
             else:
                 self.wait()
+
+            # make sure all files are closed:
+            for f in [self.stdin, self.stdout, self.stderr]:
+                try:
+                    f.close()
+                except:
+                    pass
+
             return (stdout, stderr)