Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r -u bug.orig/spawn.ml bug/spawn.ml
- --- bug.orig/spawn.ml 2015-02-04 16:28:38.000000000 +0100
- +++ bug/spawn.ml 2015-05-14 02:35:27.026125000 +0200
- @@ -61,12 +61,13 @@
- let r, _, _ = Unix.select [s] [] [] accept_timeout in
- if r = [] then raise (Failure (Printf.sprintf
- "The spawned process did not connect back in %2.1fs" accept_timeout));
- - let cs, _ = Unix.accept s in
- + let csi, _ = Unix.accept s in
- + let cso, _ = Unix.accept s in
- Unix.close s;
- - let cin, cout = Unix.in_channel_of_descr cs, Unix.out_channel_of_descr cs in
- + let cin, cout = Unix.in_channel_of_descr csi, Unix.out_channel_of_descr cso in
- set_binary_mode_in cin true;
- set_binary_mode_out cout true;
- - cs, cin, cout
- + csi, cin, cout
- let handshake cin cout =
- try
- diff -r -u bug.orig/spawned.ml bug/spawned.ml
- --- bug.orig/spawned.ml 2015-02-04 16:31:52.000000000 +0100
- +++ bug/spawned.ml 2015-05-14 02:36:39.307375000 +0200
- @@ -30,7 +30,8 @@
- let open_bin_connection h p =
- let open Unix in
- - let cin, cout = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
- + let _, cout = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
- + let cin, _ = open_connection (ADDR_INET (inet_addr_of_string h,p)) in
- set_binary_mode_in cin true;
- set_binary_mode_out cout true;
- cin, cout
Add Comment
Please, Sign In to add comment