package devkit

  1. Overview
  2. Docs
Development kit - general purpose library

Install

Dune Dependency

Authors

Maintainers

Sources

devkit-1.20240429.tbz
sha256=222f8ac131b1d970dab7eeb2714bfd6b9338b88b1082e6e01c136ae19e7eaef4
sha512=c9e6d93e3d21e5530c0f4d5baca51bf1f0a5d19248f8af7678d0665bb5cdf295d7aaaaa3e50eb2e44b8720e55097cc675af4dc8ec45acf9da39feb3eae1405d5

doc/devkit.core/Devkit_core/Pid/index.html

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.