package devkit

  1. Overview
  2. Docs

Unique process identification

type t = private {
  1. host : string;
    (*

    machine hostname (no spaces allowed)

    *)
  2. id : int;
    (*

    process id

    *)
  3. name : string;
    (*

    application id (no spaces allowed), for information.

    *)
  4. stamp : int;
    (*

    stamp for uniqueness to guard against pid reuse

    *)
}
val dummy : t

dummy instance, use sparingly

val show : t -> string
  • returns

    pretty-printed pid (human readable)

val host : t -> string
  • returns

    machine hostname

val name : t -> string
  • returns

    application name

val to_string : t -> string
  • returns

    string representation of pid, can be read back by parse_pid_exn

val compare : t -> t -> int
val equal : t -> t -> bool
val parse_exn : string -> t

Current process identifier

val set_name : string -> unit
val self : unit -> t
val self_name : unit -> string
val self_as : string -> t
val show_self : unit -> string
OCaml

Innovation. Community. Security.