From: Wei Liu Subject: Re: [PATCH 33/35] libxl: spawn: Always debug log middle child process death Date: Fri, 26 Jun 2015 15:55:34 +0100 Message-ID: <20150626145534.GI6265@zion.uk.xensource.com> References: <1435254275-8184-1-git-send-email-ian.jackson@eu.citrix.com> <1435254275-8184-34-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1435254275-8184-34-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Wei Liu , xen-devel@lists.xensource.com, Euan Harris , Ian Campbell List-Id: xen-devel@lists.xenproject.org On Thu, Jun 25, 2015 at 06:44:33PM +0100, Ian Jackson wrote: > Otherwise the debug log is strangely devoid of an explanation for the > spawn completing. > > We decorate `what', as otherwise the logged message is rather alarming > (especially if the death is due to us sending SIGKILL, which even > happens on the success path). > > Signed-off-by: Ian Jackson Acked-by: Wei Liu > --- > v4: New patch in this version of the series. > --- > tools/libxl/libxl_exec.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/tools/libxl/libxl_exec.c b/tools/libxl/libxl_exec.c > index 85cbde0..ecb30cf 100644 > --- a/tools/libxl/libxl_exec.c > +++ b/tools/libxl/libxl_exec.c > @@ -411,6 +411,8 @@ static void spawn_middle_death(libxl__egc *egc, libxl__ev_child *childw, > ((WIFEXITED(status) && WEXITSTATUS(status)==0) || > (WIFSIGNALED(status) && WTERMSIG(status)==SIGKILL))) { > /* as expected */ > + const char *what = GCSPRINTF("%s (dying as expected)", ss->what); > + libxl_report_child_exitstatus(CTX, XTL_DEBUG, what, pid, status); > } else if (!WIFEXITED(status)) { > int loglevel = ss->detaching ? XTL_WARN : XTL_ERROR; > const char *what = > -- > 1.7.10.4