Skip to content

Engine → Core

process.h

A child process started by start(), or run to completion by run(). Move-only. Destroying a process that was not waited for kills the child and its process tree first, so an engine never leaks a tool it launched and never blocks on a grandchild that kept the output open. Threading: read_output(), read_error(), is_running() and kill() may be called from any thread, including while another thread blocks in wait(). start(), wait() and destruction belong to one thread at a time.

Structs

File Description
process_desc Everything needed to launch a child process.
process_result What a finished child produced.

Classes

File Description
process A child process started by start(), or run to completion by run(). Move-only. Destroying a process that was not waited for kills the child and its process tree first, so an engine never leaks a tool it launched and never blocks on a grandchild that kept the output open. Threading: read_output(), read_error(), is_running() and kill() may be called from any thread, including while another thread blocks in wait(). start(), wait() and destruction belong to one thread at a time.

Forward Declarations

process::state

class state;

Functions

Public

current_process_id

[[nodiscard]] CONJURE_API u32 current_process_id() noexcept;

The operating system's identifier of the calling process (GetCurrentProcessId / getpid).