]> arthur.barton.de Git - bup.git/commitdiff
git.py: use close_fds=True when starting git cat-file.
authorAvery Pennarun <apenwarr@gmail.com>
Thu, 15 Jul 2010 23:15:06 +0000 (19:15 -0400)
committerAvery Pennarun <apenwarr@gmail.com>
Thu, 15 Jul 2010 23:16:05 +0000 (19:16 -0400)
Otherwise git could inherit some other file descriptors we're using.  This
is particularly relevant in cmd/web, and particularly when applying
pmccurdy's patches to use Tornado.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
lib/bup/git.py

index d9f1944de4a1fbe61b68cb746980e59835c91b48..e1482e6484e9d4b1ca238f3725e022a4a492c960 100644 (file)
@@ -792,6 +792,7 @@ class CatPipe:
         self.p = subprocess.Popen(['git', 'cat-file', '--batch'],
                                   stdin=subprocess.PIPE,
                                   stdout=subprocess.PIPE,
+                                  close_fds = True,
                                   preexec_fn = _gitenv)
 
     def _fast_get(self, id):