Up

Module Syscall

Automatically retrying system calls that may be interrupted with EINTR.

Signature

val syscall : (unit -> 'a) -> ('a, exn) Core.Std.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