package devkit

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Devkit_core.PidSource

Unique process identification

Sourcetype t = {
  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

    *)
}
Sourceval dummy : t

dummy instance, use sparingly

Sourceval show : t -> string
  • returns

    pretty-printed pid (human readable)

Sourceval host : t -> string
  • returns

    machine hostname

Sourceval name : t -> string
  • returns

    application name

Sourceval to_string : t -> string
  • returns

    string representation of pid, can be read back by parse_pid_exn

Sourceval make : id:int -> host:string -> stamp:int -> string -> t
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval parse_exn : string -> t

Current process identifier

Sourceval set_name : string -> unit
Sourceval self : unit -> t
Sourceval self_name : unit -> string
Sourceval self_as : string -> t
Sourceval show_self : unit -> string
Sourceval update : unit -> unit

call this to update Pid.self after fork

OCaml

Innovation. Community. Security.