This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

at main 1.5 kB View raw
1(** {1 Void} 2 3 Void is a library to provide {e void processes}. A void process is an 4 {e empty} process, one in which most global resources have been removed. As 5 a user, you can add back in precisely those pieces you need for your 6 process. 7 8 Void uses Eio's [fork_action]s to provide this mechanism, thus it is only 9 available with Eio. *) 10 11module Mount : sig 12 module Flags : sig 13 type t = private int 14 15 val ms_remount : t 16 val ms_bind : t 17 val ms_shared : t 18 val ( + ) : t -> t -> t 19 end 20 21 module Types : sig 22 type t = private string 23 24 val btrfs : t 25 val ext4 : t 26 val auto : t 27 end 28end 29 30type t 31(** A void process *) 32 33type path = string 34(** File paths *) 35 36type mode = R | RW 37(* Mounting modes *) 38 39type void 40(** A configuration for a void process *) 41 42val empty : void 43(** The empty void *) 44 45val rootfs : mode:mode -> path -> void -> void 46(** Add a new root filesystem *) 47 48val mount : mode:mode -> src:path -> tgt:path -> void -> void 49 50 51val cwd : string -> void -> void 52(** Set the current working directory *) 53 54val uid : int -> void -> void 55(** Set the UID *) 56 57val exec : ?env:string list -> string list -> void -> void 58(** Make a void configuration ready to be spawned *) 59 60val spawn : sw:Eio.Switch.t -> void -> t 61(** Spawn a void process *) 62 63val pid : t -> int 64(** The pid of a running void process *) 65 66val exit_status : t -> Unix.process_status Eio.Promise.t 67val exit_status_to_string : Unix.process_status -> string 68val to_eio_status : Unix.process_status -> Eio.Process.exit_status