let rec aux = function
| f::tl ->
let len = Unix.read f buf 0 1024 in
+ if len = 0 then
+ raise CHILD_DEAD;
vt100 (String.sub buf 0 len);
aux tl
| _ -> ()
done;
true
with CHILD_DEAD ->
+ ignore(Sys.signal Sys.sigchld (Sys.Signal_ignore));
let _, status = Unix.waitpid [] !pid in
- match status with
- | Unix.WEXITED 0 ->
- ignore(Sys.signal Sys.sigchld (Sys.Signal_ignore));
- true
- | _ -> false)
+ match status with | Unix.WEXITED 0 -> true | _ -> false)
let build_development_in_bg ?(target="all") refresh_cb development =