From: Ian Jackson Subject: Re: [PATCH v2 5/5] libxl: spawns two QEMUs for HVM guests Date: Tue, 9 Jun 2015 11:05:38 +0100 Message-ID: <21878.47730.226376.848343@mariner.uk.xensource.com> References: <1433417299-3568-5-git-send-email-stefano.stabellini@eu.citrix.com> <20150607115251.GU29102@zion.uk.xensource.com> <21877.47166.670829.722550@mariner.uk.xensource.com> <21877.50507.506479.620721@mariner.uk.xensource.com> <21878.47540.365857.882349@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21878.47540.365857.882349@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xensource.com, Wei Liu , Ian.Campbell@citrix.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("Re: [PATCH v2 5/5] libxl: spawns two QEMUs for HVM guests"): > The spawn_outcome function does something like this: > > int worst_rc = 0; > > libxl_report_child_exitstatus(...) > dcs->qemus[myself]->rc = status ? ERROR_QEMU_DIED : 0; > > for (i=0; i if (libxl__ev_child_inuse(&dcs->qemus[i].childw)) > return; > if (dcs->qemus[i].rc IS WORSE THAN worst_rc) > worst_rc = dcs->qemus[i].rc; > } > /* all qemus have completed */ > if (worst_rc) > domcreate_complete(egc, dcs, worst_rc) > else > domain_create_do_next_thing(egc, dcs, ...); ... except you're using libxl__spawn, not libxl__ev_child, so you don't get status but rather rc and you don't need to call libxl_report_child_exitstatus, and instead of a childw you probably have a dmss. But the principles are the same. Ian.