From c8921f3fafa3d3a85d66080bf03e9b2dc71751e5 Mon Sep 17 00:00:00 2001 From: Jon Ludlam Date: Mon, 8 Mar 2010 11:28:56 +0000 Subject: [PATCH] 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 --- forking_executioner/child.ml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/forking_executioner/child.ml b/forking_executioner/child.ml index 9ebe326..1806698 100644 --- a/forking_executioner/child.ml +++ b/forking_executioner/child.ml @@ -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 -- 2.39.5