diff --git a/debian/changelog b/debian/changelog
index 543a5d2c9fe71b1e0034256b082e05cca4c0f8b2..c6f5730bc035f6f3f59f674bb5845c69ebf35c90 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-defaults (2.6.5-12) unstable; urgency=low
+
+  * pycompile: do not hang if interpreters are not started in the same order
+    as they're used (LP: #613675)
+
+ -- Piotr Ożarowski <piotr@debian.org>  Thu, 05 Aug 2010 19:15:52 -0400
+
 python-defaults (2.6.5-11) unstable; urgency=medium
 
   * Add README.PyDist to python-doc package
diff --git a/pycompile b/pycompile
index f70aa2853b06409866d0d43e6a1bedb2f2df1cdd..79755564fec6b7f95ffb1194edb6b8e2719f3d0a 100755
--- a/pycompile
+++ b/pycompile
@@ -168,7 +168,8 @@ def py_compile(version, workers):
     if not isinstance(version, basestring):
         version = vrepr(version)
     cmd = "python%s -m py_compile -" % version
-    process = Popen(cmd, bufsize=1, shell=True, stdin=PIPE)
+    process = Popen(cmd, bufsize=1, shell=True,
+                    stdin=PIPE, close_fds=True)
     workers[version] = process  # keep the reference for .communicate()
     stdin = process.stdin
     while True: