History

Avoid infinite recursion

malc committed 6 years ago

Commit dc0331e1 parent e2cacb01 file · +7 −10Browse files

Unified · Split

main.ml+7−10
@@ -5190,17 +5190,14 @@ let () = · 5189 unmodified lines
51905190 checkfds rest
51915191
51925192 | fd :: rest when fd = state.stderr ->
5193+ Format.printf "err@.";
51935194 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;
52045201 checkfds rest
52055202
52065203 | fd :: rest when Some fd = !optrfd ->

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t