From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [autotest] vm creation fails (not) Date: Wed, 05 Aug 2009 17:58:30 +0200 Message-ID: <4A79AC26.9070308@redhat.com> References: <137563426.1515521249487326121.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , KVM list To: Michael Goldish Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44438 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933958AbZHEP6d (ORCPT ); Wed, 5 Aug 2009 11:58:33 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n75FwYUe008302 for ; Wed, 5 Aug 2009 11:58:34 -0400 In-Reply-To: <137563426.1515521249487326121.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/05/09 17:48, Michael Goldish wrote: >> You should use wait() to find out if the process is alive, not tricks >> with the PID and process name, which are racy as you found out. > > I'm not sure I can do that because the process I'm interested in isn't a > child of mine. wait() doesn't work then. But why it isn't a child? > In any case, I'd still need to use the process name to make sure the PID > belongs to the original process, because PIDs are reused after a while. No. If it is your child the process continue to exist as zombie until you've asked for the exit status using wait(). cheers, Gerd