Re: [autotest] vm creation fails (not)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- "Gerd Hoffmann" <kraxel@xxxxxxxxxx> wrote:

> 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.

By "command line" I meant the executable name + arguments.
In this case the arguments really contain a command line, because the
executable started is sh, with '-c' and the qemu command as arguments.

> 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

Oh well, I suppose it would be more accurate to say that I didn't take
into account the time it takes execve() to finish.  kvm_subprocess
explicitly calls fork() and execv(), so I should have known better.

Thanks again.
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux