]> git.decadent.org.uk Git - dak.git/commitdiff
Do not pass all file descriptiors to external process.
authorAnsgar Burchardt <ansgar@debian.org>
Fri, 15 Apr 2016 06:37:10 +0000 (08:37 +0200)
committerAnsgar Burchardt <ansgar@debian.org>
Fri, 15 Apr 2016 06:37:10 +0000 (08:37 +0200)
daklib/filewriter.py

index 6f5da4f0d8314c5aeecc0c5a216b7b37f9b6db23..582453026931e55a52102d2d35d80be10ad3a670 100644 (file)
@@ -86,7 +86,7 @@ class BaseFileWriter(object):
         out_filename = "{0}{1}.new".format(path, suffix)
         if cmd is not None:
             with open(in_filename, 'r') as in_fh, open(out_filename, 'w') as out_fh:
-                check_call(cmd, stdin=in_fh, stdout=out_fh)
+                check_call(cmd, stdin=in_fh, stdout=out_fh, close_fds=True)
         self.rename("{0}{1}".format(path, suffix))
 
     def close(self):