Added
Link Here
|
1 |
--- ocamlbuild/ocamlbuild_executor.ml.orig 2011-10-06 11:39:50.358159931 +0300 |
2 |
+++ ocamlbuild/ocamlbuild_executor.ml 2011-10-06 12:48:32.966029354 +0300 |
3 |
@@ -200,7 +200,11 @@ |
4 |
try |
5 |
read fd u 0 (String.length u) |
6 |
with |
7 |
- | Unix.Unix_error(_,_,_) -> 0 |
8 |
+ | Unix.Unix_error(e,_,_) -> |
9 |
+ let msg = error_message e in |
10 |
+ display (fun oc -> fp oc |
11 |
+ "Error while reading stdout/stderr: %s\n" msg); |
12 |
+ 0 |
13 |
in |
14 |
if m = 0 then |
15 |
if job.job_dying then |
16 |
@@ -236,6 +240,8 @@ |
17 |
(*display begin fun oc -> fp oc "Terminating job %a\n%!" print_job_id job.job_id; end;*) |
18 |
|
19 |
decr jobs_active; |
20 |
+ clear_nonblock (doi job.job_stdout); |
21 |
+ clear_nonblock (doi job.job_stderr); (* we would get EAGAIN below otherwise *) |
22 |
do_read ~loop:true (doi job.job_stdout) job; |
23 |
do_read ~loop:true (doi job.job_stderr) job; |
24 |
outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs); |