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 16:52:29 +0200 Message-ID: <4A799CAD.1000703@redhat.com> References: <186914453.1505591249481143448.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: KVM list To: Michael Goldish Return-path: Received: from mx2.redhat.com ([66.187.237.31]:44879 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934507AbZHEOwd (ORCPT ); Wed, 5 Aug 2009 10:52: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 n75EqYdD020455 for ; Wed, 5 Aug 2009 10:52:34 -0400 In-Reply-To: <186914453.1505591249481143448.JavaMail.root@zmail05.collab.prod.int.phx2.redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/05/09 16:05, Michael Goldish wrote: > Thanks, I managed to reproduce it and I'll send a patch to fix it soon. > The reason for autotest thinking qemu wasn't alive was that apparently it > takes time for /proc/$PID/cmdline to reflect the real command used to > start the process, and I wrongly assumed it was instantaneous. There is no "command line used to start the process" in unix. A new process is created using fork(). An process can replace itself with a new executable using execve(). Usual way to start some application in unix is this: (1) fork() (2) prepare environment (i/o redirection for example) (3) execve() (2)+(3) happen in the new child process created by (1). /proc/$pid/cmdline will reflect that of course. It will show the qemu command line once execve(qemu) syscall finished. HTH, Gerd