Skip to main content

Module process_io

Module process_io 

Source
Expand description

Resource and lifetime guards for trusted interpreter processes.

Structs§

ProcessGroup
Abort the whole Unix process group on completion, failure or cancellation. Scripts remain trusted: a child that deliberately creates a new session can escape this cleanup. Windows uses a kill-on-close Job Object.

Constants§

MAX_STDERR_BYTES
MAX_STDOUT_BYTES
SECRET_NAME_PARTS
Substrings (upper case) of an environment variable name that mark it as a credential.
SECRET_NAME_SUFFIXES
Suffixes (upper case) of an environment variable name that mark it as a credential: HF_TOKEN, CI_JOB_TOKEN, STRIPE_SECRET, MINIO_ACCESS_KEY. The _TOKEN and _ACCESS_KEY cases are the ones no entry in SECRET_NAME_PARTS covers.
STRIPPED_ENV
Environment variables an interpreter child never inherits.

Functions§

env_is_stripped
Whether an environment variable named name is withheld from interpreter children.
read_bounded
Stop on the first byte beyond the limit, without retaining that excess.