]> xenbits.xensource.com Git - xcp/xen-api-libs.git/commitdiff
CA-38105: The recent patch to the recv_fd function causes it to return an fd of ...
authorJon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Mon, 8 Mar 2010 11:28:56 +0000 (11:28 +0000)
committerJon Ludlam <Jonathan.Ludlam@eu.citrix.com>
Mon, 8 Mar 2010 11:28:56 +0000 (11:28 +0000)
Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
forking_executioner/child.ml

index 9ebe326a31cd7d87250bcf0874166a4179f641d2..1806698f32a7ac7ee8ee1a1fd1d2d5ffc41e92ee 100644 (file)
@@ -18,6 +18,10 @@ open Fe_debug
 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