package shexp

  1. Overview
  2. Docs
Process library and s-expression based shell

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=d19e518ace68dc86bc18e9af6b2b2ee0c62ed3341a25cf10cf464f22cb4f8b5d

doc/shexp.process/Shexp_process/Context/index.html

Module Shexp_process.ContextSource

Execution contexts

Execution contexts

Sourcetype t

An evaluation context represent all the information maintained by shexp_process in order to evaluate a process description.

This consists of:

  • stdin, stdout, stderr
  • the current working directory
  • the unix environment variables
Sourcemodule Working_dir : sig ... end
Sourceval create : ?stdin:Unix.file_descr -> ?stdout:Unix.file_descr -> ?stderr:Unix.file_descr -> ?cwd:Working_dir.t -> ?unix_env:(string * string) list -> unit -> t

Creates a new execution context. Non-specified fields are captured from the environment of current running program.

Sourceval dispose : t -> unit

In order to safely maintain several working directories inside the same system process, shexp keeps a file descriptor of the working directory of the context. You need to dispose of an execution context in order to close this file descriptor.

OCaml

Innovation. Community. Security.