WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

[Xen-devel] [PATCH] Improve XendCheckpoint's forkHelper error handling

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Improve XendCheckpoint's forkHelper error handling
From: Brendan Cully <brendan@xxxxxxxxx>
Date: 2006年12月13日 17:46:12 -0700
Delivery-date: 2006年12月13日 17:46:11 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Brendan Cully <brendan@xxxxxxxxx>
# Date 1166060750 28800
# Node ID f2e7504c6693b80c98bb0b5368f3f7a4e5021333
# Parent 147608edc24993eaff17fd57709c77b8e2fee6b2
Improve XendCheckpoint's forkHelper error handling.
When inputHandler raises an exception, close stdin and stdout in the
child before attempting to close stderr, which is held open by a
separate thread. Without this patch, exceptions raised by device
migration caused xend to hang on child.childerr.close().
Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
diff -r 147608edc249 -r f2e7504c6693 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py Wed Dec 13 17:42:38 2006 -0800
+++ b/tools/python/xen/xend/XendCheckpoint.py Wed Dec 13 17:45:50 2006 -0800
@@ -224,18 +224,17 @@ def forkHelper(cmd, fd, inputHandler, cl
 log.debug('%s', line)
 inputHandler(line, child.tochild)
 
- thread.join()
-
 except IOError, exn:
 raise XendError('Error reading from child process for %s: %s' %
 (cmd, exn))
 finally:
 child.fromchild.close()
- child.childerr.close()
 if not closeToChild:
 child.tochild.close()
-
- status = child.wait()
+ thread.join()
+ child.childerr.close()
+ status = child.wait()
+
 if status >> 8 == 127:
 raise XendError("%s failed: popen failed" % string.join(cmd))
 elif status != 0:
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: RE: [Xen-devel] [PATCH] Export Multicore information , Kamble, Nitin A
Next by Date: [Xen-devel] [RFC] CD-ROM cannot be changed , Kasai Takanori
Previous by Thread: [Xen-devel] [PATCH] [xend and libxenapi] Fix VM.get_power_state API , Jim Fehlig
Next by Thread: Re: [Xen-devel] [PATCH] Improve XendCheckpoint's forkHelper error handling , Brendan Cully
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /