From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=55755 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PUsCU-0008D4-3r for qemu-devel@nongnu.org; Mon, 20 Dec 2010 21:43:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PUsCS-0003Fi-MU for qemu-devel@nongnu.org; Mon, 20 Dec 2010 21:43:42 -0500 Received: from [222.73.24.84] (port=60856 helo=song.cn.fujitsu.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PUsCS-0003DU-4I for qemu-devel@nongnu.org; Mon, 20 Dec 2010 21:43:40 -0500 Message-ID: <4D10149D.1070700@cn.fujitsu.com> Date: Tue, 21 Dec 2010 10:44:45 +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> <4D0EB06D.6060001@cn.fujitsu.com> <29897010-A575-4C94-8016-C0FC03652B64@web.de> In-Reply-To: <29897010-A575-4C94-8016-C0FC03652B64@web.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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/20/2010 02:33 PM, Andreas F=E4rber Write: > Am 20.12.2010 um 02:25 schrieb Wen Congyang: >=20 >> 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: >>>> =3D=3D=3D=3D=3D=3D >>>> close(17) =3D 0 >>>> --- SIGCHLD (Child exited) @ 0 (0) --- >>>> wait4(-1, NULL, WNOHANG, NULL) =3D 22016 >>>> rt=5Fsigreturn(0) =3D 0 >>>> wait4(22016, 0x7fff7f1034fc, 0, NULL) =3D -1 ECHILD (No child >>>> processes) >>>> =3D=3D=3D=3D=3D=3D >>>> >>>> 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... :) >=20 > os-posix.c part looks sane to me, but what about Win32? Wouldn't it need > stub functions? I do not know whether there is same BUG on Windows. I will add stub functions for Win32. >=20 > Andreas >=20