Unified · Split
| @@ -5190,17 +5190,14 @@ let () = · 5189 unmodified lines | ||
| 5190 | 5190 | checkfds rest |
| 5191 | 5191 | |
| 5192 | 5192 | | fd :: rest when fd = state.stderr -> |
| 5193 | + Format.printf "err@."; | |
| 5193 | 5194 | let b = Bytes.create 80 in |
| 5194 | − let rec loop () = | |
| 5195 | − match Unix.read fd b 0 80 with | |
| 5196 | − | 0 -> () | |
| 5197 | − | n -> | |
| 5198 | − adderrmsg "stderr" @@ Bytes.sub_string b 0 n; | |
| 5199 | − loop () | |
| 5200 | − | exception Unix.Unix_error (Unix.EINTR, _, _) -> () | |
| 5201 | − | exception exn -> adderrmsg "Unix.read exn" @@ exntos exn | |
| 5202 | − in | |
| 5203 | − loop (); | |
| 5195 | + begin match Unix.read fd b 0 80 with | |
| 5196 | + | 0 -> () | |
| 5197 | + | n -> adderrmsg "stderr" @@ Bytes.sub_string b 0 n | |
| 5198 | + | exception Unix.Unix_error (Unix.EINTR, _, _) -> () | |
| 5199 | + | exception exn -> adderrmsg "Unix.read exn" @@ exntos exn | |
| 5200 | + end; | |
| 5204 | 5201 | checkfds rest |
| 5205 | 5202 | |
| 5206 | 5203 | | fd :: rest when Some fd = !optrfd -> |