From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KWVP4-0001Qe-FL for qemu-devel@nongnu.org; Fri, 22 Aug 2008 08:06:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KWVP3-0001Pa-UP for qemu-devel@nongnu.org; Fri, 22 Aug 2008 08:06:06 -0400 Received: from [199.232.76.173] (port=56234 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KWVP3-0001PR-Qb for qemu-devel@nongnu.org; Fri, 22 Aug 2008 08:06:05 -0400 Received: from mx1.redhat.com ([66.187.233.31]:34557) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KWVP3-0002gb-5Y for qemu-devel@nongnu.org; Fri, 22 Aug 2008 08:06:05 -0400 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m7MC64xJ009279 for ; Fri, 22 Aug 2008 08:06:04 -0400 Received: from pobox.stuttgart.redhat.com (pobox.stuttgart.redhat.com [172.16.2.10]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m7MC63VQ030006 for ; Fri, 22 Aug 2008 08:06:04 -0400 Received: from zweiblum.travel.kraxel.org (vpn-4-90.str.redhat.com [10.32.4.90]) by pobox.stuttgart.redhat.com (8.13.1/8.13.1) with ESMTP id m7MC63oo013869 for ; Fri, 22 Aug 2008 08:06:03 -0400 Message-ID: <48AEABAA.9060705@redhat.com> Date: Fri, 22 Aug 2008 14:06:02 +0200 From: Gerd Hoffmann MIME-Version: 1.0 Subject: Re: [Qemu-devel] Re: [5055] Handle terminating signals (Gerd Hoffmann) References: <48AE9963.5040603@siemens.com> <48AEA3B4.5050300@redhat.com> <48AEA94D.1080002@siemens.com> In-Reply-To: <48AEA94D.1080002@siemens.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jan Kiszka wrote: >> Just double-checked. I don't get a warning for some strange reason. >> Was wondered how a warning bypassed my attention. > > I like colorgcc for this a lot (either distcc or icecream is said to > support this as well). :) emacs does this too, and it even beams the cursor to the line in question. Assuming there is a warning in the first place. >> You probably see "ret can be used uninitialized ...", right? > > Yep. Are you compiling qemu with gcc-3.3 (here: 3.3.3 hammer, x86_64 host)? compat-gcc-34 package here, --version says: gcc34 (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) > >>> --- a/vl.c >>> +++ b/vl.c >>> @@ -7624,8 +7624,10 @@ static int main_loop(void) >>> timeout = 0; >>> } >>> } else { >>> - if (shutdown_requested) >>> + if (shutdown_requested) { >>> + ret = EXCP_INTERRUPT; >>> break; >>> + } >> Fix looks fine to me. > > So we don't need to bother about no_shutdown in this path? I don't think so. The no_shutdown makes qemu stop the vm instead of exiting instantly, probably to allow analyzing the situation in case of a guest-triggered shutdown. There is no point in doing so in case the vm already is in stopped state. cheers, Gerd -- http://kraxel.fedorapeople.org/xenner/