Module Async_unix.Syscall

Automatically retrying system calls that may be interrupted with EINTR.

module Syscall_result = Core.Unix.Syscall_result
val syscall : (unit ‑> 'a) ‑> ('a, exn) Core.Result.t

syscall f repeatedly calls f until it returns or raises an exception that isn't Unix_error (EINTR, _, _).

val syscall_result : 'a ‑> ('a ‑> 'b Syscall_result.t) ‑> 'b Syscall_result.t

syscall_result a f repeatedly calls f a until it returns a result that is not Syscall_result.create_error EINTR.

val syscall_result2 : 'a ‑> 'b ‑> ('a ‑> 'b ‑> 'c Syscall_result.t) ‑> 'c Syscall_result.t