From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH] add acpi powerbutton support Date: Tue, 22 Jan 2008 10:48:19 +0100 Message-ID: <4795BBE3.5060609@redhat.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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Jan Kiszka , Guido Guenther To: Avi Kivity Return-path: In-Reply-To: <47947857.4020004-atKUWr5tajBWk0Htik3J/w@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 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. 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. cheers, Gerd ------------------------------------------------------------------------- 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/