Signed-off-by: Jon Ludlam <[email protected]>

 forking_executioner/child.ml |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


# HG changeset patch
# User Jonathan Ludlam <[email protected]>
# Date 1267197666 0
# Node ID 1639be0acfba42e131a79ae06b47058ac1bf9f35
# Parent  45b22c29867df47adc2dc21a008c6f6730e6e4fc
CA-38105: The recent patch to the recv_fd function causes it to return an fd of -1 rather than segfault, so catch that and log what was actually received on the socket

Signed-off-by: Jon Ludlam <[email protected]>

diff -r 45b22c29867d -r 1639be0acfba forking_executioner/child.ml
--- a/forking_executioner/child.ml	Wed Feb 17 10:14:40 2010 +0000
+++ b/forking_executioner/child.ml	Fri Feb 26 15:21:06 2010 +0000
@@ -18,6 +18,10 @@
 let handle_fd_sock fd_sock state =
   try
     let (newfd,buffer) = Fecomms.receive_named_fd fd_sock in
+    if Unixext.int_of_file_descr newfd = -1 then begin
+      debug "Failed to receive an fd associated with the message '%s'" buffer;
+      failwith "Didn't get an fd"
+    end;
     let dest_fd = List.assoc buffer state.id_to_fd_map in
     let fd = begin 
       match dest_fd with 
_______________________________________________
xen-api mailing list
[email protected]
http://lists.xensource.com/mailman/listinfo/xen-api

Reply via email to