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

Re: [Xen-devel] [problem in `xl_cmdimpl.c`] Why pid return by fork() in parent process is not the same with pid returned by getpid()?





On Thu, Aug 2, 2012 at 5:55 PM, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote:
On Thu, 2012-08-02 at 10:47 +0100, éç wrote:

> Â Â In xen-4.1.2/tools/libxl/xl_cmdimpl.c : create_domain(), it starts

If you are doing development then target xen-unstable would be
preferable, especially if you are looking at (lib)xl. The xl stuff in
4.1 is effectively a preview and it has change substantially internally
since 4.1.

> After input `xl create xp-101.hvm`, you got `Daemon running with PID
> 26622` following the command line in the screen; but the xl log file
> lies in /var/log/xen/xl-xp-101.log contains a line `Waiting for domain
> xp-101 (domid 1) to die [pid 26624]`.
> Why 26622 != 26624? ÂAnd 26622 could not be found by `ps -ef` command.
> What happended to that?!

There's a call to dameon in there, which will involve a double fork
IIRC.

Ian.


  What do you mean by `double fork`?ÂIn my opinion, the parent exit after invoking waitpid, and the child goes on toward the rest of the code.
  The PID recorded in xl log file Âcan't also be found by `ps -ef` command. ÂHow should I retrive the PID of the real daemon process?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.