From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] add acpi powerbutton support Date: Tue, 22 Jan 2008 11:06:47 +0100 Message-ID: <4795C037.2030304@siemens.com> References: <20080103181415.GB1077@bogon.ms20.nix> <477D50FE.4040104@qumranet.com> <20080104183158.GA14002@bogon.ms20.nix> <47809A8F.5090803@qumranet.com> <20080107115916.GA24050@bogon.ms20.nix> <20080107120223.GB24050@bogon.ms20.nix> <47821EC8.4020308@qumranet.com> <20080108080928.GA9823@bogon.ms20.nix> <479219D6.1000707@web.de> <20080120115617.GA31618@bogon.ms20.nix> <47946D4A.5000808@siemens.com> <47947857.4020004@qumranet.com> <4795BBE3.5060609@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Guido Guenther , Avi Kivity To: Gerd Hoffmann Return-path: In-Reply-To: <4795BBE3.5060609-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Gerd Hoffmann wrote: > Hi, > >>>> Catching ctrl-c sounds like a good idea but "ctrl-c, ctrl-c" should >>>> probably kill qemu then, since the machine might have no acpid running - >>>> in that case hitting ctrl-c would have no effect. >>>> >>> Good idea. >>> >> I'm worried about the 30+ second shutdown latency. Is there precedent >> for SIGTERM or SIGINT requiring this long to take effect? > > xenner signals a shutdown request to the guest for the first SIGINT (and > prints a message to the user saying so). Sending SIGINT twice kills the > guest and cleans up. I find that very useful, you can shutdown the > guest cleanly with a convenient Ctrl-C and also kill it off quickly by > simply pressing Ctrl-C again. Yeah. After having worked with this feature for a few days (I'm mostly running qemu/kvm from command line, w/ and w/o SDL GUI), I can only underline the usefulness of it again. > > SIGTERM kills the guest instantly. Applictions are expected to react > quickly on SIGTERM, there is no way you can wait for a clean guest > shutdown then. It is used on (host) shutdown for example, where you'll > get a SIGKILL when you don't exit within three seconds. > Ack, let's stick with SIGINT. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/