From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=54764 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUUTe-00082Q-4U for qemu-devel@nongnu.org; Sun, 19 Dec 2010 20:23:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUUTc-0000Oe-NT for qemu-devel@nongnu.org; Sun, 19 Dec 2010 20:23:50 -0500 Received: from [222.73.24.84] (port=63866 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUUTc-0000Nt-AX for qemu-devel@nongnu.org; Sun, 19 Dec 2010 20:23:48 -0500 Message-ID: <4D0EB06D.6060001@cn.fujitsu.com> Date: Mon, 20 Dec 2010 09:25:01 +0800 From: Wen Congyang MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] disable sigcld handling before calling pclose() References: <4D005006.9080307@cn.fujitsu.com> <4D07378B.3050901@cn.fujitsu.com> In-Reply-To: <4D07378B.3050901@cn.fujitsu.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=GB2312 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel , Luiz Capitulino , Anthony Liguori At 12/14/2010 05:23 PM, Wen Congyang Write: > At 2010-12-09 11:41, Wen Congyang Write: >> When I use the command 'virsh save' to save the domain state, >> I receive the following error message: >> operation failed: Migration unexpectedly failed. >> >> I debug the qemu by adding some printf(), and find the function >> pclose() returns -1. >> >> I use strace to trace qemu, the log is as the following: >> ====== >> close(17) = 0 >> --- SIGCHLD (Child exited) @ 0 (0) --- >> wait4(-1, NULL, WNOHANG, NULL) = 22016 >> rt_sigreturn(0) = 0 >> wait4(22016, 0x7fff7f1034fc, 0, NULL) = -1 ECHILD (No child processes) >> ====== >> >> We wait the child twice: one is in signal SIGCHLD handling and the other >> one is in pclose(). >> >> We should disable sigcld handling before calling pclose(). >> >> Signed-off-by: Wen Congyang >> > Ping :) > > Ping Again... :)