projects
/
invirt/packages/invirt-autoinstaller.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25fdee1
)
Work around bug in Python subprocess for remctl
author
Eric Price
<ecprice@mit.edu>
Thu, 15 May 2008 22:45:15 +0000
(18:45 -0400)
committer
Eric Price
<ecprice@mit.edu>
Thu, 15 May 2008 22:45:15 +0000
(18:45 -0400)
svn path=/trunk/packages/sipb-xen-guest-installer/; revision=528
files/usr/sbin/sipb-xen-lvcopy
patch
|
blob
|
history
diff --git
a/files/usr/sbin/sipb-xen-lvcopy
b/files/usr/sbin/sipb-xen-lvcopy
index
065cda2
..
317b88a
100755
(executable)
--- a/
files/usr/sbin/sipb-xen-lvcopy
+++ b/
files/usr/sbin/sipb-xen-lvcopy
@@
-7,6
+7,11
@@
import tempfile
import time
from subprocess import call, check_call, Popen, PIPE
+# Make sure to use up fd 0 to avoid a bug in subprocess in Python <= 2.5.1
+# NB we need to do this on every Python remctl script.
+# See r53624 in Python svn.
+sys.stdin = open('/dev/null')
+
def losetup(source, offset=0):
p = Popen(['sipb-xen-losetup', source, str(offset)], stdout=PIPE)
return p.communicate()[0].strip()