Rev 5245: (lifeless) Merge from 2.1, in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri May 21 05:57:19 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5245 [merge]
revision-id: pqm at pqm.ubuntu.com-20100521045717-qe9khoe3xia0fqwm
parent: pqm at pqm.ubuntu.com-20100520235521-nog5pngmbiaxgaby
parent: robertc at robertcollins.net-20100521032843-9bc6ad9gxjodmoil
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2010-05-21 05:57:17 +0100
message:
  (lifeless) Merge from 2.1,
   fix for closing fd's when a specific file is supplied to status/commit etc.
   (Robert Collins)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/_readdir_pyx.pyx        readdir.pyx-20060609152855-rm6v321vuaqyh9tu-1
=== modified file 'NEWS'
--- a/NEWS	2010-05-20 09:27:48 +0000
+++ b/NEWS	2010-05-21 03:28:43 +0000
@@ -140,6 +140,11 @@
 * Using bzr with `lp:` urls behind an http proxy should work.
   (Robert Collins, #558343)
 
+* When passing a file to ``UTF8DirReader`` make sure to close the current
+  directory file handle after the chdir fails. Otherwise when passing many
+  filenames into a command line ``bzr status`` we would leak descriptors.
+  (John Arbash Meinel, #583486)
+
 Improvements
 ************
 
@@ -669,6 +674,11 @@
 * Support Pyrex 0.9.9, required changing how we handle exceptions in Pyrex.
   (John Arbash Meinel, #582656)
 
+* When passing a file to ``UTF8DirReader`` make sure to close the current
+  directory file handle after the chdir fails. Otherwise when passing many
+  filenames into a command line ``bzr status`` we would leak descriptors.
+  (John Arbash Meinel, #583486)
+
 Internals
 *********
 
@@ -1132,6 +1142,12 @@
   python merged the end of run patch, which chose ``stopTestRun`` rather than
   ``done``. (Robert Collins, #571437)
 
+* When passing a file to ``UTF8DirReader`` make sure to close the current
+  directory file handle after the chdir fails. Otherwise when passing many
+  filenames into a command line ``bzr status`` we would leak descriptors.
+  (John Arbash Meinel, #583486)
+
+
 bzr 2.0.5
 #########
 

=== modified file 'bzrlib/_readdir_pyx.pyx'
--- a/bzrlib/_readdir_pyx.pyx	2010-02-17 17:11:16 +0000
+++ b/bzrlib/_readdir_pyx.pyx	2010-05-21 01:55:34 +0000
@@ -307,6 +307,9 @@
         if orig_dir_fd == -1:
             raise_os_error(errno, "open: ", ".")
         if -1 == chdir(path):
+            # Ignore the return value, because we are already raising an
+            # exception
+            close(orig_dir_fd)
             raise_os_error(errno, "chdir: ", path)
     else:
         orig_dir_fd = -1




More information about the bazaar-commits mailing list