Module UnixExtras


module UnixExtras: sig  end
Supplements to the Unix module

val make_daemon : (unit -> unit) -> bool -> unit
Runs f in a new daemon process. The calling process will exit * if the second argument is true. * * For example: * let _ = UnixExtras.make_daemon server_func true * will start a new process and run server_func in it, while the original * process will exit. See Stevens, Advanced Programming in the Unix Environment * for details.
val send_file : src:Unix.file_descr -> dest:Unix.file_descr -> start:int -> len:int -> int
Reads len bytes from the src descr with offset start and copies them to the dest descr. Currently implemented only for Linux and FreeBSD. The FreeBSD sendfile() system call requires that dest be a socket.
Raises Unix_error on failure.


Sevent functions


val getservent : unit -> Unix.service_entry
Same as Unix getservent(3)
val setservent : bool -> unit
Same as Unix setservent(3)
val endservent : unit -> unit
Same as Unix endservent(3)