From: Sasha Levin Subject: Re: [PATCH 4/5] kvm tools: Add 'kvm list' command Date: Sun, 03 Jul 2011 21:42:56 +0300 Message-ID: <1309718576.4117.20.camel@sasha> References: <1309707490-14946-1-git-send-email-levinsasha928@gmail.com> <1309707490-14946-4-git-send-email-levinsasha928@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: mingo@elte.hu, asias.hejun@gmail.com, prasadjoshi124@gmail.com, gorcunov@gmail.com, kvm@vger.kernel.org To: Pekka Enberg Return-path: Received: from mail-wy0-f174.google.com ([74.125.82.174]:38939 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754533Ab1GCSnL (ORCPT ); Sun, 3 Jul 2011 14:43:11 -0400 Received: by wyg8 with SMTP id 8so3034711wyg.19 for ; Sun, 03 Jul 2011 11:43:09 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On Sun, 2011-07-03 at 21:09 +0300, Pekka Enberg wrote: > On Sun, 3 Jul 2011, Sasha Levin wrote: > > Use 'kvm list' to list running virtual guest. > > > > Signed-off-by: Sasha Levin > > The pidfiles don't seem to get cleaned after guests exit. I ran 'make > check' a few times and I now see this: > > penberg@tiger:~/linux/tools/kvm$ ./kvm list > guest-6121 (PID: 6121) > guest-6184 (PID: 6184) > guest-6035 (PID: 6035) > penberg@tiger:~/linux/tools/kvm$ ps -eaf|grep kvm > root 27 2 0 21:06 ? 00:00:00 [kvm-irqfd-clean] > penberg 6204 5502 0 21:08 pts/1 00:00:00 grep --color=auto kvm > Looks like it's the result of exiting the kernel test without properly freeing everything. Is there a nice way to handle the pids when exiting with exit() or die()? -- Sasha.