[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [XEND] Mark save record fd close-on-exec after calling xc_restore
# HG changeset patch # User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx> # Date 1173876580 0 # Node ID 35c9a1939ae43e62d56666b59d2db3da1c8f9d37 # Parent 4d7327502ba6e5776f22c80e541f9298ee0692d5 [XEND] Mark save record fd close-on-exec after calling xc_restore so that qemu doesn't end up with an open fd on it Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx> --- tools/python/xen/xend/XendCheckpoint.py | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -r 4d7327502ba6 -r 35c9a1939ae4 tools/python/xen/xend/XendCheckpoint.py --- a/tools/python/xen/xend/XendCheckpoint.py Wed Mar 14 11:38:26 2007 +0000 +++ b/tools/python/xen/xend/XendCheckpoint.py Wed Mar 14 12:49:40 2007 +0000 @@ -9,6 +9,7 @@ import re import re import string import threading +import fcntl from struct import pack, unpack, calcsize from xen.util.xpopen import xPopen3 @@ -230,6 +231,15 @@ def restore(xd, fd, dominfo = None, paus forkHelper(cmd, fd, handler.handler, True) + # We don't want to pass this fd to any other children -- we + # might need to recover ths disk space that backs it. + try: + flags = fcntl.fcntl(fd, fcntl.F_GETFD) + flags |= fcntl.FD_CLOEXEC + fcntl.fcntl(fd, fcntl.F_SETFD, flags) + except: + pass + if handler.store_mfn is None: raise XendError('Could not read store MFN') _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |