module Unix:sig..end
Popular functions from the standard Unix module, but all calls are executed in work threads.
They are usually part of uwt, not libuv. They were added to
simplify testing uwt with existing code that originally used
lwt.unix.
But be careful: Functions like Uwt.Unix.gethostbyname don't fail with
Not_found, but with Unix_error(Unix.ENOENT,"function_name",x)
or other appropriate error codes. Uwt_compat.Lwt_unix provides
functions under the same name that also fails with Not_found.
val gethostname : unit -> string Lwt.tReturn the name of the local host.
val gethostbyname : string -> Unix.host_entry Lwt.tFind an entry in hosts with the given name.
val gethostbyaddr : Unix.inet_addr -> Unix.host_entry Lwt.tFind an entry in hosts with the given address.
val getservbyname : name:string -> protocol:string -> Unix.service_entry Lwt.tFind an entry in services with the given name.
val getservbyport : int -> string -> Unix.service_entry Lwt.tFind an entry in services with the given service number.
val getprotobyname : string -> Unix.protocol_entry Lwt.tFind an entry in protocols with the given name.
val getprotobynumber : int -> Unix.protocol_entry Lwt.tFind an entry in protocols with the given protocol number.
val getlogin : unit -> string Lwt.tReturn the login name of the user executing the process.
val getpwnam : string -> Unix.passwd_entry Lwt.tFind an entry in passwd with the given name.
val getpwuid : int -> Unix.passwd_entry Lwt.tFind an entry in passwd with the given user id.
val getgrnam : string -> Unix.group_entry Lwt.tFind an entry in group with the given name.
val getgrgid : int -> Unix.group_entry Lwt.tFind an entry in group with the given group id.
val lseek : file -> int64 -> Unix.seek_command -> int64 Lwt.tSet the current position for a file descriptor, and return the resulting offset (from the beginning of the file).
val getcwd : unit -> string Lwt.tReturn the name of the current working directory.
val chdir : string -> unit Lwt.tChange the process working directory.
val chroot : string -> unit Lwt.tChange the process root directory.
val lockf : file -> Unix.lock_command -> int64 -> unit Lwt.tSee the long comment at the standard Unix module
val sleep : float -> unit Lwt.tsleep d is a thread that remains suspended for d seconds
and then terminates.
val pipe : ?cloexec:bool -> unit -> (Uwt.Pipe.t * Uwt.Pipe.t) uv_resultpipe () creates pipes similar to Unix.pipe, but as
cloexec : is true by defaultval pipe_exn : ?cloexec:bool -> unit -> Uwt.Pipe.t * Uwt.Pipe.t
val realpath : string -> string Lwt.twrapper around realpath under Unix and GetFinalPathNameByHandleW or GetFullPathName under windows. Deprecated. Use Uwt.Fs.realpath instead, it will also work for older libuv versions.