From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=56496 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PaItF-0006H4-K5 for qemu-devel@nongnu.org; Tue, 04 Jan 2011 21:14:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PaItD-0008Gk-Sk for qemu-devel@nongnu.org; Tue, 04 Jan 2011 21:14:17 -0500 Received: from [222.73.24.84] (port=61431 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PaItD-0008FR-CU for qemu-devel@nongnu.org; Tue, 04 Jan 2011 21:14:15 -0500 Message-ID: <4D23D43C.9060907@cn.fujitsu.com> Date: Wed, 05 Jan 2011 10:15:24 +0800 From: Wen Congyang MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v2] disable sigcld handling before calling pclose() References: <4D005006.9080307@cn.fujitsu.com> <4D07378B.3050901@cn.fujitsu.com> <4D0EB06D.6060001@cn.fujitsu.com> <29897010-A575-4C94-8016-C0FC03652B64@web.de> <4D102795.9040107@cn.fujitsu.com> In-Reply-To: <4D102795.9040107@cn.fujitsu.com> Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= , qemu-devel , Luiz Capitulino , Anthony Liguori At 12/21/2010 12:05 PM, 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(). > > v2: > - Add stub functions for Win32 > > Signed-off-by: Wen Congyang > Ping Again... :) This is a bug fix.