sig
  val handle_unix_error : ('-> 'Lwt.t) -> '-> 'Lwt.t
  val sleep : float -> unit Lwt.t
  val yield : unit -> unit Lwt.t
  val auto_yield : float -> unit -> unit Lwt.t
  exception Timeout
  val timeout : float -> 'Lwt.t
  val with_timeout : float -> (unit -> 'Lwt.t) -> 'Lwt.t
  type file_descr
  type state = Open | Closed | Aborted of exn
  val state : Lwt_unix.file_descr -> Lwt_unix.state
  val openfile :
    string -> Unix.open_flag list -> Unix.file_perm -> Lwt_unix.file_descr
  val unix_file_descr : Lwt_unix.file_descr -> Unix.file_descr
  val of_unix_file_descr : Unix.file_descr -> Lwt_unix.file_descr
  val of_unix_file_descr_blocking : Unix.file_descr -> Lwt_unix.file_descr
  val blocking : Lwt_unix.file_descr -> bool
  val set_blocking : Lwt_unix.file_descr -> bool -> unit
  val abort : Lwt_unix.file_descr -> exn -> unit
  val close : Lwt_unix.file_descr -> unit
  val set_close_on_exec : Lwt_unix.file_descr -> unit
  val clear_close_on_exec : Lwt_unix.file_descr -> unit
  val fchmod : Lwt_unix.file_descr -> Unix.file_perm -> unit
  val fchown : Lwt_unix.file_descr -> int -> int -> unit
  val dup : Lwt_unix.file_descr -> Lwt_unix.file_descr
  val dup2 : Lwt_unix.file_descr -> Lwt_unix.file_descr -> unit
  val lockf : Lwt_unix.file_descr -> Unix.lock_command -> int -> unit
  val stdin : Lwt_unix.file_descr
  val stdout : Lwt_unix.file_descr
  val stderr : Lwt_unix.file_descr
  val read : Lwt_unix.file_descr -> string -> int -> int -> int Lwt.t
  val write : Lwt_unix.file_descr -> string -> int -> int -> int Lwt.t
  val wait_read : Lwt_unix.file_descr -> unit Lwt.t
  val wait_write : Lwt_unix.file_descr -> unit Lwt.t
  val pipe : unit -> Lwt_unix.file_descr * Lwt_unix.file_descr
  val pipe_in : unit -> Lwt_unix.file_descr * Unix.file_descr
  val pipe_out : unit -> Unix.file_descr * Lwt_unix.file_descr
  val lseek : Lwt_unix.file_descr -> int -> Unix.seek_command -> int
  val ftruncate : Lwt_unix.file_descr -> int -> unit
  val fstat : Lwt_unix.file_descr -> Unix.stats
  val isatty : Lwt_unix.file_descr -> bool
  module LargeFile :
    sig
      val lseek : Lwt_unix.file_descr -> int64 -> Unix.seek_command -> int64
      val ftruncate : Lwt_unix.file_descr -> int64 -> unit
      val fstat : Lwt_unix.file_descr -> Unix.LargeFile.stats
    end
  type signal_handler_id
  val on_signal : int -> (int -> unit) -> Lwt_unix.signal_handler_id
  val disable_signal_handler : Lwt_unix.signal_handler_id -> unit
  type dir_handle
  val opendir : string -> Lwt_unix.dir_handle
  val readdir : Lwt_unix.dir_handle -> string Lwt.t
  val rewinddir : Lwt_unix.dir_handle -> unit
  val closedir : Lwt_unix.dir_handle -> unit
  type resource_usage = { ru_utime : float; ru_stime : float; }
  val wait : unit -> (int * Unix.process_status) Lwt.t
  val waitpid :
    Unix.wait_flag list -> int -> (int * Unix.process_status) Lwt.t
  val wait4 :
    Unix.wait_flag list ->
    int -> (int * Unix.process_status * Lwt_unix.resource_usage) Lwt.t
  val has_wait4 : bool
  val system : string -> Unix.process_status Lwt.t
  val socket :
    Unix.socket_domain -> Unix.socket_type -> int -> Lwt_unix.file_descr
  val socketpair :
    Unix.socket_domain ->
    Unix.socket_type -> int -> Lwt_unix.file_descr * Lwt_unix.file_descr
  val bind : Lwt_unix.file_descr -> Unix.sockaddr -> unit
  val listen : Lwt_unix.file_descr -> int -> unit
  val accept :
    Lwt_unix.file_descr -> (Lwt_unix.file_descr * Unix.sockaddr) Lwt.t
  val accept_n :
    Lwt_unix.file_descr ->
    int -> (Lwt_unix.file_descr * Unix.sockaddr) list Lwt.t
  val connect : Lwt_unix.file_descr -> Unix.sockaddr -> unit Lwt.t
  val shutdown : Lwt_unix.file_descr -> Unix.shutdown_command -> unit
  val getsockname : Lwt_unix.file_descr -> Unix.sockaddr
  val getpeername : Lwt_unix.file_descr -> Unix.sockaddr
  val getsockopt : Lwt_unix.file_descr -> Unix.socket_bool_option -> bool
  val setsockopt :
    Lwt_unix.file_descr -> Unix.socket_bool_option -> bool -> unit
  val getsockopt_int : Lwt_unix.file_descr -> Unix.socket_int_option -> int
  val setsockopt_int :
    Lwt_unix.file_descr -> Unix.socket_int_option -> int -> unit
  val getsockopt_optint :
    Lwt_unix.file_descr -> Unix.socket_optint_option -> int option
  val setsockopt_optint :
    Lwt_unix.file_descr -> Unix.socket_optint_option -> int option -> unit
  val getsockopt_float :
    Lwt_unix.file_descr -> Unix.socket_float_option -> float
  val setsockopt_float :
    Lwt_unix.file_descr -> Unix.socket_float_option -> float -> unit
  val getsockopt_error : Lwt_unix.file_descr -> Unix.error option
  type credentials = { cred_pid : int; cred_uid : int; cred_gid : int; }
  val get_credentials : Lwt_unix.file_descr -> Lwt_unix.credentials
  val recv :
    Lwt_unix.file_descr ->
    string -> int -> int -> Unix.msg_flag list -> int Lwt.t
  val recvfrom :
    Lwt_unix.file_descr ->
    string -> int -> int -> Unix.msg_flag list -> (int * Unix.sockaddr) Lwt.t
  val send :
    Lwt_unix.file_descr ->
    string -> int -> int -> Unix.msg_flag list -> int Lwt.t
  val sendto :
    Lwt_unix.file_descr ->
    string -> int -> int -> Unix.msg_flag list -> Unix.sockaddr -> int Lwt.t
  type io_vector = {
    iov_buffer : string;
    iov_offset : int;
    iov_length : int;
  }
  val io_vector :
    buffer:string -> offset:int -> length:int -> Lwt_unix.io_vector
  val recv_msg :
    socket:Lwt_unix.file_descr ->
    io_vectors:Lwt_unix.io_vector list -> (int * Unix.file_descr list) Lwt.t
  val send_msg :
    socket:Lwt_unix.file_descr ->
    io_vectors:Lwt_unix.io_vector list ->
    fds:Unix.file_descr list -> int Lwt.t
  val tcgetattr : Lwt_unix.file_descr -> Unix.terminal_io
  val tcsetattr :
    Lwt_unix.file_descr -> Unix.setattr_when -> Unix.terminal_io -> unit
  val tcdrain : Lwt_unix.file_descr -> unit
  val tcflush : Lwt_unix.file_descr -> Unix.flush_queue -> unit
  val tcflow : Lwt_unix.file_descr -> Unix.flow_action -> unit
  type watchers
  exception Retry
  exception Retry_read
  exception Retry_write
  val inputs : Lwt_unix.watchers
  val outputs : Lwt_unix.watchers
  val wrap_syscall :
    Lwt_unix.watchers -> Lwt_unix.file_descr -> (unit -> 'a) -> 'Lwt.t
  val check_descriptor : Lwt_unix.file_descr -> unit
  val register_action :
    Lwt_unix.watchers -> Lwt_unix.file_descr -> (unit -> 'a) -> 'Lwt.t
  val inputs_length : unit -> int
  val outputs_length : unit -> int
  val wait_children_length : unit -> int
  val get_new_sleeps : unit -> int
  val sleep_queue_size : unit -> int
  val run : 'Lwt.t -> 'a
end