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

Re: [Xen-devel] [PATCH v2] xl: track child processes for the benefit of libxl



On Fri, 2012-05-18 at 19:25 +0100, Ian Jackson wrote:
> Each time xl forks, it needs to record the pid, so that its exit

I was just about to apply this but testing with pygrub gives me:

libxl: critical: libxl_fork.c:314:libxl__fork_selfpipe_woken: DISASTER in event 
loop:  reported by libxl_childproc_hooks->reaped_callback (for pid=7023, 
status=0; error code 1): Success
libxl: critical: libxl_event.c:1005:libxl__event_disaster: DISASTER in event 
loop not handled by libxl application
libxl: fatal error, exiting program: DISASTER in event loop not handled by 
libxl application

I think the return codes of xl_reaped_callback are just bogus, according
to the comment it should return 0 if it knows the child,
ERROR_UNKNOWN_CHILD if not and anything else is a disaster. Incremental
fix is:

diff -r a5ff801ed897 tools/libxl/xl.c
--- a/tools/libxl/xl.c  Fri May 25 10:32:06 2012 +0100
+++ b/tools/libxl/xl.c  Fri May 25 10:37:37 2012 +0100
@@ -163,10 +163,10 @@ static int xl_reaped_callback(pid_t got,
         if (ch->pid == got) {
             ch->reaped = 1;
             ch->status = status;
-            return 1;
+            return 0;
         }
     }
-    return 0;
+    return ERROR_UNKNOWN_CHILD;
 }
 
 static const libxl_childproc_hooks childproc_hooks = {



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