-----Original Message-----
From: Daniel P. Berrange [mailto:berrange@redhat.com]
Sent: Monday, October 28, 2013 7:29 PM
To: Michal Privoznik
Cc: Chen Hanxiao; libvir-list(a)redhat.com
Subject: Re: [libvirt] [PATCH]lxc: improve readability of
lxcContainer[Send|Waitfor]Continue
On Mon, Oct 21, 2013 at 02:28:37PM +0100, Michal Privoznik wrote:
> On 16.10.2013 08:27, Chen Hanxiao wrote:
> > From: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
> >
> > Currently, lxcContainer[Send|Waitfor]Continue only tell
> > us 'fd', but we had to deal with the interaction between
> > lxc_[container|controller|process].
> > This patch adds parameters to identify the caller.
> >
> > Signed-off-by: Chen Hanxiao <chenhanxiao(a)cn.fujitsu.com>
> > ---
> > src/lxc/lxc_container.c | 16 +++++++++-------
> > src/lxc/lxc_container.h | 4 ++--
> > src/lxc/lxc_controller.c | 6 +++---
> > src/lxc/lxc_process.c | 2 +-
> > 4 files changed, 15 insertions(+), 13 deletions(-)
>
> I think this can be achieved even without this hack. We already can
> produce a stack trace on VIR_DEBUG() [1]. And if you don't want to keep
> only some debug messages, apply filters.
FYI, you don't even need to look at stack traces. The debug message
includes the PID - the LXC controller will have a large random PID
number, while what will become the container init process will have
PID ==1
That would be very helpful.
Thanks for your debug hint.