close input of subprocess once stdin has been sent to it

This commit is contained in:
Simon Cruanes 2013-03-19 16:21:23 +01:00
parent 9708c4b01c
commit a4c8e3e408

View file

@ -343,6 +343,7 @@ let spawn_process ?(pool=default_pool) ?(stdin="") ~cmd =
output_string inp stdin;
(* send stdin to command *)
flush inp;
close_out inp;
(* read output of process *)
let out' = slurp out in
let err' = slurp err in