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

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


  • To: xen-devel <xen-devel@xxxxxxxxxxxxx>
  • From: éç <aware.why@xxxxxxxxx>
  • Date: Thu, 2 Aug 2012 17:47:49 +0800
  • Delivery-date: Thu, 02 Aug 2012 09:48:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

Hi all,
    In xen-4.1.2/tools/libxl/xl_cmdimpl.c : create_domain(), it starts up a child daemon process waiting for the domain death,  
there are several lines echo the child pid as follows:

1592        if (child1) {                                  /*it's in the parent*/                                                                                                                                                                                 
1593            printf("Daemon running with PID %d\n", child1); 


/**it's in the child/
1643    LOG("Waiting for domain %s (domid %d) to die [pid %ld]",                                                                                                                                                                            
1644        d_config.c_info.name, domid, (long)getpid());  



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?!


Thanks in advance!
_______________________________________________
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®.