SHARE
TWEET

Untitled

a guest Feb 18th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. diff -r -u bug.orig/spawn.ml bug/spawn.ml
  2. --- bug.orig/spawn.ml   2015-02-04 16:28:38.000000000 +0100
  3. +++ bug/spawn.ml    2015-05-14 02:35:27.026125000 +0200
  4. @@ -61,12 +61,13 @@
  5.    let r, _, _ = Unix.select [s] [] [] accept_timeout in
  6.    if r = [] then raise (Failure (Printf.sprintf
  7.      "The spawned process did not connect back in %2.1fs" accept_timeout));
  8. -  let cs, _ = Unix.accept s in
  9. +  let csi, _ = Unix.accept s in
  10. +  let cso, _ = Unix.accept s in
  11.    Unix.close s;
  12. -  let cin, cout = Unix.in_channel_of_descr cs, Unix.out_channel_of_descr cs in
  13. +  let cin, cout = Unix.in_channel_of_descr csi, Unix.out_channel_of_descr cso in
  14.    set_binary_mode_in cin true;
  15.    set_binary_mode_out cout true;
  16. -  cs, cin, cout
  17. +  csi, cin, cout
  18.  
  19.  let handshake cin cout =
  20.    try
  21. diff -r -u bug.orig/spawned.ml bug/spawned.ml
  22. --- bug.orig/spawned.ml 2015-02-04 16:31:52.000000000 +0100
  23. +++ bug/spawned.ml  2015-05-14 02:36:39.307375000 +0200
  24. @@ -30,7 +30,8 @@
  25.  
  26.  let open_bin_connection h p =
  27.    let open Unix in
  28. -  let cin, cout = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
  29. +  let _, cout = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
  30. +  let cin, _ = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
  31.    set_binary_mode_in cin true;
  32.    set_binary_mode_out cout true;
  33.    cin, cout
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top