From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hu4mg-0005Fo-7B for qemu-devel@nongnu.org; Fri, 01 Jun 2007 06:55:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hu4md-0005Aa-Sx for qemu-devel@nongnu.org; Fri, 01 Jun 2007 06:55:05 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hu4md-0005A2-JK for qemu-devel@nongnu.org; Fri, 01 Jun 2007 06:55:03 -0400 Received: from mx03.kabsi.at ([195.202.128.130]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Hu4mc-0001yY-W9 for qemu-devel@nongnu.org; Fri, 01 Jun 2007 06:55:03 -0400 Received: from [192.168.1.101] (h081217014229.dyn.cm.kabsi.at [81.217.14.229]) by mx03.kabsi.at (8.13.6/8.13.6) with ESMTP id l51At0IJ001409 for ; Fri, 1 Jun 2007 12:55:01 +0200 Message-ID: <465FFAFF.50800@kittenberger.net> Date: Fri, 01 Jun 2007 12:54:55 +0200 From: Axel Kittenberger MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] stale pid files? 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 Hi list again, another suggestion. I use the deamons pidfile feature to write pidfiles so I can controll the virtual machines with /etc/init.d/bla scripts, to e.g. auto spawn the guests when the server starts, auto/start/stop with runlevels and so on.. However I got following issue, the daemon wont start if there is a pidfile already (yes no problem for user to delete, but for auto spawning after unattended boot) . Since e.g. following situation: BANG! Powerout! .... System goes up when power is available again. The init scripts want to start the qemu/kvm deamons, but they refuse because these see their pidfiles already from pre-powerout.. I have seen other daemons somehow locking their pidfiles while running, and when killed -9ed, or poweroutes and they start again, they see their pid-file is unlocked, thus stale, and just overwrite it... only notifing you with a message they did so. Kind Regards, Axel