Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

CA-38105: The recent patch to the recv_fd function causes it to retur…

…n an fd of -1 rather than segfault, so catch that and log what was actually received on the socket

Signed-off-by: Jon Ludlam <Jonathan.Ludlam@eu.citrix.com>
  • Loading branch information...
commit c8921f3fafa3d3a85d66080bf03e9b2dc71751e5 1 parent eabcb1d
@jonludlam jonludlam authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 forking_executioner/child.ml
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.