fix: be sure to block sigpipe in subthread

This commit is contained in:
Simon Cruanes 2020-07-10 12:10:51 -04:00
parent 6d63840877
commit fe114ffa8d

View file

@ -101,6 +101,7 @@ let call_full_inner ?(bufsize=2048) ?(stdin=`Str "") ?(env=Unix.environment()) ~
let t_out =
Thread.create
(fun oc ->
ignore (Thread.sigmask Unix.SIG_BLOCK [Sys.sigint;Sys.sigpipe]: _ list);
out := read_all ~size:bufsize oc)
oc in
let err = read_all ~size:bufsize errc in