Disable libguestfs' default atexit handlers.
These aren't safe for multi-threaded applications, per the bug report from Daniel Berrange. Closes-bug: #1261475 Change-Id: I4cc5eaded2e21f1b2cd55615242a27b9773f0b42
This commit is contained in:
parent
6df885f87c
commit
02abbef960
@ -17,7 +17,7 @@
|
||||
|
||||
class GuestFS(object):
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, close_on_exit=True):
|
||||
self.drives = []
|
||||
self.running = False
|
||||
self.closed = False
|
||||
|
@ -108,7 +108,7 @@ class VFSGuestFS(vfs.VFS):
|
||||
def setup(self):
|
||||
LOG.debug(_("Setting up appliance for %(imgfile)s %(imgfmt)s") %
|
||||
{'imgfile': self.imgfile, 'imgfmt': self.imgfmt})
|
||||
self.handle = tpool.Proxy(guestfs.GuestFS())
|
||||
self.handle = tpool.Proxy(guestfs.GuestFS(close_on_exit=False))
|
||||
|
||||
try:
|
||||
self.handle.add_drive_opts(self.imgfile, format=self.imgfmt)
|
||||
|
Loading…
Reference in New Issue
Block a user