diff options
| author | Robert Norton | 2017-04-25 21:04:41 +0100 |
|---|---|---|
| committer | Robert Norton | 2017-04-25 21:04:41 +0100 |
| commit | f5e585ab875399a926d02706cc9208539860f7b8 (patch) | |
| tree | 9019db574ef9e3850d93cb2de0a8d14bbf62e8c0 /mips/run_embed.ml | |
| parent | 169d1275885549f1083d9647b0e2877c77b55434 (diff) | |
extend the try around call to select to avoid gprof crashing with EINTR.
Diffstat (limited to 'mips/run_embed.ml')
| -rw-r--r-- | mips/run_embed.ml | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mips/run_embed.ml b/mips/run_embed.ml index a1d9e059..0386c981 100644 --- a/mips/run_embed.ml +++ b/mips/run_embed.ml @@ -117,11 +117,11 @@ let rec debug_print_caps capregs start stop = else () let handle_uart uart_written uart_wdata uart_rdata uart_rvalid = - let (pending, _, _) = (Unix.select [Unix.stdin] [] [] 0.0) in - if pending != [] then - try + try + let (pending, _, _) = Unix.select [Unix.stdin] [] [] 0.0 in + if pending != [] then input_buf := (!input_buf) @ [(input_byte stdin)] - with End_of_file -> (); + with _ -> (); if (read_bit_reg uart_written) then begin |
